Getting Started with Docker
Mr. K,
What is Docker?
Docker is an open platform for developing, shipping, and running applications. Docker enables you to separate your applications from your infrastructure so you can deliver software quickly. With Docker, you can manage your infrastructure in the same ways you manage your applications.
Core Concepts
- Images: A Docker image is a lightweight, standalone, executable package of software that includes everything needed to run an application: code, runtime, system tools, system libraries and settings.
- Containers: A container is a runtime instance of a Docker image. You can create, start, stop, move, or delete a container using the Docker API or CLI.
- Dockerfile: A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image.
Basic Docker Commands
Here are a few basic commands to get you started:
docker build -t my-app .- Builds an image from a Dockerfile in the current directory.docker run -p 8080:80 my-app- Runs a container from themy-appimage and maps port 8080 on the host to port 80 in the container.docker ps- Lists running containers.docker images- Lists available images.
Docker simplifies the development lifecycle by allowing developers to work in standardized environments using local containers which provide your applications and services.
© Mr. K.RSS