exec

  • docker exec -it <container name> /bin/bash

run

docker run -d --rm \
	--name watchtower
	-v /var/run/docker.sock:/var/run/docker.sock \
	containrrr/watchtower \
	alist
  • -d flag to run the container in detached mode.
  • --name specify a name to the container
  • --rm to automatically delete it when it exits
  • -p 8080:80: Map TCP port 80 in the container to port 8080 on the Docker host.

rm

  • docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q)
  • docker rm $(docker ps -a -q)

Multi Stage Build