Docker

Docker is a platform for developing, shipping, and running applications in containers.

Install

  • Download the installer.
  • Open it and follow the instructions.
docker: command not found

Docker Desktop does not configure its CLI by default.

  • Visit Settings > Advanced
  • Select System.

Manage

Remove dangling images - unused images with no names or tags.

docker rmi $(docker images -f "dangling=true" -q)

Navigate

List local Docker images.

docker images

Explore an image using cd, ls, etc.

docker run -it --rm ${IMAGE_NAME} /bin/sh

Authenticate to Docker Hub

Use a personal access token to authenticate to Docker Hub.

Troubleshooting

Docker adds 128 to Node error codes, making it harder to debug.

For example, if you see error 243, subtract 128 from it to get the actual error code 115: 243 - 128 = 115

Docker error codes

Subtract 128 from a Docker error code to calculate the actual error code.

Docker
Interactive graph
On this page
Install
Manage
Navigate
Authenticate to Docker Hub
Troubleshooting