What is Docker?
Docker is an open platform that allows the user to virtually create different software packages in things called, "containers"
Why is Docker so powerful?
Docker is so powerful because you're able to very easily create software and play around with it very quickly without having to worry about a lot of the backend part of the code and how getting the server up and running works
How to use 'Play with Docker'
To start with 'Play with Docker' you'll need to head over to the website
Once you're on the website, create an account and login. Once you log in the green "login" button on the homepage will change to say "start"
Once you hit start, you'll see a page that looks like this:
Now to start playing around with Docker you can just hit the "+ Add New Instance" button" and you'll start the Docker server and the webpage will look like this:
Now you're all ready to play around with Docker, have fun!
Creating a DockerFile for our NASA Image Search repo
In order to get your own web application running in Docker you will first need a DockerFile.
- Here is a link to the Docker Docs that explain what a Docker File is and how to create one. Docker Docs - Docker File
In order to actually build your Docker container you need to run, docker build -t getting-started .
but replace the "getting-started" with the name of your component.
To actually start the app container all you have to do is type docker run -dp 3000:3000 getting-started
into the terminal and just like last step replace "getting-started" with the component name.
Make sure you open the 3000 port through Play with Docker, or go to localhost:3000 to see the application if using the downloaded version of Docker.
Top comments (0)