sábado, dezembro 18, 2021

Docker Commands

Some docker commands for reference:

Commands:

# List images
docker images

# Run a docker
docker run imageID

# List the docker container that is running
docker ps

# Check the docker IP
docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ContainerID

# Build a docker (look for a docker file)
docker build .

# Tag your local image image
docker tag ImageID name

# Tag to Remote repository (node17 repository)
docker tag node17 myr.azurecr.io/node17

# Push to remote Azure container registry (node17 repository)
docker push myr.azurecr.io/node17

# Delete all containers
docker rm $(docker ps -a -q) 
 
# Delete all images
docker rmi $(docker images -a -q)
 


Nenhum comentário: