This project starter kit will create a base template using on Drupal Projects
1. Ubuntu: Ubuntu latest official image
docker build -t ubuntu:v1 . --no-cache=true
docker run -v /home/ec2-user/environment/base_docker/content:/var/www/html -d -p 8080:80 ubuntu:v1
## List all dangling images
docker images -f dangling=true
## Delete all dangling images
docker images -f dangling=true -q | xargs docker rmi
## Force delete all dangling images
docker images -f dangling=true -q | sudo xargs docker rmi -f
docker rm -fv <NAME>
Whenever you require some container id or have to check what you have running you can use these commands:
# List your containers
docker container ls
# List your images
docker image ls
# List your volumes
docker volume ls
# List your networks
docker network ls
# Most used:
docker ps -a
Most of the time when you get into disk space issues you want to check what components you can get rid of. So before you execute any of the commands below, always check what you have on your system by listing your components.
# Clean up "stopped" containers
docker container prune
# Clean up "unused" images, you can add the --all option if you want to remove
# all unused images instead of just the dangling ones.
docker image prune
# Clean up "unused" volumes
docker volume prune
# Clean up "unused" networks
docker network prune
# Clean up everything:
docker system prune
## This will remove:
- all stopped containers
- all networks not used by at least one container
- all images without at least one container associated to them
- all build cache
# Check orphan docker volumes
docker volume ls -qf dangling=true
# Prune orphan docker volumes
docker volume rm $(docker volume ls -qf dangling=true)
alias dcweb="docker-compose exec web "
dcweb composer --version