docker build -t project/my-app .
docker run --name name-of-container -p 8080:8080 --detach project/my-app
docker ps
docker ps -a
docker stop $(docker ps -aq)
docker rm $(docker ps -aq)
docker rmi $(docker images -q)
Remove Volumes
docker volume rm $(docker volume ls -q)
docker system prune -a
docker builder prune --all
docker exec -it [container_id] /bin/bash
docker exec -u root -it [container_id] /bin/bash
You can examine a container's metadata in Docker by using Docker inspect:
docker inspect [container_id]
Build with no cache
docker-compose build --no-cache
Build and up
docker-compose up -d --build
If cache stays in memory
docker-compose up --force-recreate
Windows + WSL 2 (Ubuntu 18.04).
Type in the Windows file explorer :
For Docker version 20.10.+ : \\wsl$\docker-desktop-data\data\docker\volumes
For Docker Engine v19.03: \\wsl$\docker-desktop-data\version-pack-data\community\docker\volumes\