Getting to know Docker and its Power

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, D…


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.

Image description 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

  • In the session, click on Add New Instance to get started.
    Image description

  • Clone the repository in and use the ls -la command to verify the contents of the folder.

Image description

  • 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.
    Image description

  • List your images. Type 'docker images' in the CLI to see the new todoapp image.
    Image description

  • 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.
    Image description

  • Now that you have containerized your application, you are able to create multiple todoapps.
    Image description

  • That wraps it up for setting up with Docker

Image description


This content originally appeared on DEV Community and was authored by Matthew Wigoff


Print Share Comment Cite Upload Translate Updates
APA

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/

MLA
" » Getting to know Docker and its Power." Matthew Wigoff | Sciencx - Thursday April 28, 2022, https://www.scien.cx/2022/04/28/getting-to-know-docker-and-its-power/
HARVARD
Matthew Wigoff | Sciencx Thursday April 28, 2022 » Getting to know Docker and its Power., viewed ,<https://www.scien.cx/2022/04/28/getting-to-know-docker-and-its-power/>
VANCOUVER
Matthew Wigoff | Sciencx - » Getting to know Docker and its Power. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/04/28/getting-to-know-docker-and-its-power/
CHICAGO
" » Getting to know Docker and its Power." Matthew Wigoff | Sciencx - Accessed . https://www.scien.cx/2022/04/28/getting-to-know-docker-and-its-power/
IEEE
" » Getting to know Docker and its Power." Matthew Wigoff | Sciencx [Online]. Available: https://www.scien.cx/2022/04/28/getting-to-know-docker-and-its-power/. [Accessed: ]
rf:citation
» Getting to know Docker and its Power | Matthew Wigoff | Sciencx | 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.

You must be logged in to translate posts. Please log in or register.