Docker
Tips and tricks working with Docker
CLI Commands
Download Image
docker pull <image_name>:<tag>
Exec into Container
docker exec -it <name> /bin/bash
The
name
is what you used when launching the container-it
launches an interactive shell (bash in this case)
Kill a Running Container
docker rm <name> --force
The
name
is what you used when launching the container
List Local Images
docker image ls
List Running Containers
docker ps -a
Login to a Registry
docker login --username <username> --password-stdin <registry_name>
Run Docker Image Locally
docker run --platform linux/amd64 -it --name <whatever> <image_name>
--platform linux/amd64
(Optional) Makes the warning go away when executing x86 images on ARM
Last updated
Was this helpful?