Context
# List the contexts
docker context list
# use a particulr context (here desktop-linux)
docker context use desktop-linux
Sample Context list
Current DOCKER_HOST based configuration
- name:
default
- type:
moby
- docker endpoint:
unix:///var/run/docker.sock
Docker Desktop
- name:
desktop-linux
- type:
moby
- docker endpoint:
unix:///Users/kartikeykumar/.docker/run/docker.sock
Rancher Desktop moby context
- name:
rancher-desktop
- type:
moby
- docker endpoint:
unix:///Users/kartikeykumar/.rd/docker.sock
Copy files between container and host
- copy from container to host
docker cp <container>:<container-path> <host-path>
- copy from host to container
docker cp <host-path> <container>:<container-path>
View the Docker manifest
- helpful to see the architecture of the image
- container can be local or on registry, give full tag name
docker manifest inspect <container>