Docker starter read

docker run -d -p 80:80 docker/getting-started

  • -d – run the container in detached mode (in the background)
  • -p 80:80 – map port 80 of the host to port 80 in the container
  • docker/getting-started – the image to use

Trabajando con un Dockerfile

docker build -t getting-started .

  • -t Final image
  • . dockerfile en el directorio

You can stop and remove a container in a single command by adding the «force» flag to the docker rm command. For example: docker rm -f <the-container-id>