Deploy an App with Docker

DUGLAS MORENODUGLAS MORENO 👁 4
Deploy an App with Docker ⬇ Descargar infografía

Learn how to install Docker, build an image, and run a container end‑to‑end. This guide covers installation, pulling images, building from a Dockerfile, and managing the container lifecycle.

apt-get install

Install Docker Engine via package manager

$ apt-get install docker.io

docker --version

Check Docker version and engine

$ docker --version

docker pull

Download a sample image from Docker Hub

$ docker pull hello-world

docker build

Create an image from a Dockerfile

$ docker build -t myapp .

docker run

Start container in detached mode, map port

$ docker run -d -p 8080 myapp

docker logs

Stream container logs in real time

$ docker logs -f myapp

docker restart

Restart a running container

$ docker restart myapp

docker stop

Stop container gracefully

$ docker stop myapp

docker rm

Delete a stopped container

$ docker rm myapp

Comentarios (0)

Sé el primero en comentar.

Dejá tu comentario