Docker
At the base, Docker is a container management service. It is very powerful because it acts as a platform to develop, run, and ship applications. It is lightweight and secure while containing everything necessary for running applications. It also allows for running multiple containers from one host.
Play With Docker
Play With Docker is the tutorial provided to get familiar with Docker. There are a few options, a 101 tutorial, a lab environment, and other learning materials. It is very easy to set up, just download the desktop version and run the command docker run -d -p 80:80 docker/getting-started
in the terminal to open the tutorial. It walks you through step-by-step what to do to set up the tutorial and your first application.
Follow the instructions and you’re all set – you made your first containerized application!
Using Docker with Existing Apps
As we saw above, it’s very easy to get started using Docker and it’s still easy to utilize for your own projects. If you regularly use node/npm in your development, there is a very helpful guide on their Dockerizing tutorial.
It follows a similar setup as the Play With Docker example in creating a Dockerfile (shown below) and a .dockerignore file, which is useful for dealing with the node modules and logs so they don’t get copied into the image.
I have also added an example of a docker-compose file, used to define and run apps that are composed of multiple containers.
The service is pretty easy to understand overall, but they also provide really helpful guides and reference sheets with their extensive documentation if you do run into any problems.
Top comments (0)