Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 1.51 KB

File metadata and controls

48 lines (33 loc) · 1.51 KB

Some helpful docker commands:

Starting it all up for local development:

docker-compose up


To clear out unused entities:

  • docker system prune

This includes stopped containers. Need to compare this to the series of commands below

To clear everything out (good to do on occasion for your dev environment)

  1. Stop all containers
    docker stop $(docker ps -a -q)
  2. Delete all containers
    docker rm $(docker ps -a -q)
  3. Delete all images
    docker rmi $(docker images -q)
  4. Remove all volumes
    docker volume prune

Some other commands you may find useful

  • Containters:
    • List:
      docker ps -a
    • Start:
      docker start container_tag
    • Connect & bash:
      docker exec -ti container_tag bash
    • Stop:
      docker stop container_tag
    • Delete:
      docker rm container_tag
  • Images:
    • List:
      docker images
    • Delete:
      docker rmi <tag or ID>
  • Volumes
    • list:
      docker volume ls
    • View metadata:
      dovker volume inspect volume_name
    • delete unused:
      docker volume prune
    • delete:
      docker volume rm volume_name
  • Delete all volumes
    docker volume ls -q -f dangling=true (I'm not sure this applies to wl, we don't yet have any containerized volumes set up)

Issues

Docker for Windows

  • No data / files in the containers: open the docker for windows settings, a look for the shared drives, C:/ should be checked. (This can happen when you switch between using Windows containers and Linux containers.)