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

Run Docker Image Locally

  • --platform linux/amd64 (Optional) Makes the warning go away when executing x86 images on ARM

Last updated

Was this helpful?