Aller au contenu

Aide-Memoire

Commande de base#

Bash
# Build image
docker build -t my_img .

#Copy file in image
docker cp /C/Users/phili/.aws my_img:/root/.aws

# Run Terminal container
docker run -it --rm my_img:tag

# Run Terminal container with a command
docker container run --rm -it my_img:tag bash

# Reset WSL Clock in Windows (need to restart wsl)
wsl --shutdown`

Commande avec Docker Compose#

Bash
# Run Manually with ports active
docker compose run --service-ports --rm <service_name> bash

Details sur les images#

Bash
1
2
3
4
5
# See size of intermediate images
docker image history my_img:tag

# Details about an image
docker image inspect my_img:tag