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
-dflag to run the container in detached mode.--namespecify a name to the container--rmto automatically delete it when it exits-p 8080:80: Map TCP port80in the container to port8080on 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
- Multi-stage builds | Docker Documentation
- Can be used to decrease the size of image since only optimized build is contained in image while dependencies are burnt.