This content originally appeared on DEV Community and was authored by Matthew Wigoff
Why Docker is Powerful
Docker is a platform for building, running, and shipping applications. We can easily package up our applications with all the files they need to run on any Operating System. Docker uses containers. In this isolated environment, Docker can use many versions of node at the same time. If an application uses Node 14 and another application uses Node 9, both of these applications will run on the same machine at the same time because of Docker's containers. Another powerful aspect of a Docker container is that they don't take up much memory on your hard drive.
src: https://jfrog.com/knowledge-base/the-basics-a-beginners-guide-to-docker/
Getting Started with Docker
Download Docker for your specific Operating System at Docker Docs
For Windows, you may get an installation incomplete message stating your Linux kernel needs to be updated. Follow the link in the error message and go down to step 4 to download the latest Linux kernel on your machine.
To get familiar with how Docker works go to Labs - Play with Docker and follow the steps here
Clone the repository in and use the ls -la command to verify the contents of the folder.
Establish the Container. In the CLI type 'docker build -t todoapp .' to build an image for the application. The (.) after the command tells the system the Dockerfile can be found in the current directory. The -t is to tag the image with a descriptive name.
List your images. Type 'docker images' in the CLI to see the new todoapp image.
Run the Container. Now that the image is established, use the command 'docker run -d -p 3000:3000 todoapp' to run the new container based on the new image.
Now that you have containerized your application, you are able to create multiple todoapps.
That wraps it up for setting up with Docker
This content originally appeared on DEV Community and was authored by Matthew Wigoff
Matthew Wigoff | Sciencx (2022-04-28T19:19:04+00:00) Getting to know Docker and its Power. Retrieved from https://www.scien.cx/2022/04/28/getting-to-know-docker-and-its-power/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.