docker

# To do a "clean" build of PDI 
`
docker-compose stop  
docker-compose rm -f  
docker-compose build --no-cache  
docker-compose up -d --force-recreate --remove-orphans  
`

# Image Management
`
docker images -a  
docker images -f dangling=true  
docker rmi $( docker images -q -f dangling=true) 
docker rmi $(docker images -a -q)  
`

# Container Management
`
docker ps -a  
docker rm $(docker ps -a -f status=exited -q)  
docker container ls  
docker container run  
docker start CONTAINER_ID  
docker stop CONTAINER_ID  
docker kill CONTAINER_ID  
`

# Volume Management
`
docker volume ls  

Tags: 

composer

# Install composer on CentOS
cd /tmp
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Now you can to use the command composer globally.

# To build a Zend Expressive based project
composer create-project -s rc zendframework/zend-expressive-skeleton expressive-demo-app

Tags: 

Useful Docker Commands

docker --help
docker COMMAND --help

Image Management
=======================================
docker image ls
docker image build
docker rm

Container Management
=======================================
docker container ls
docker container run
docker start
docker stop
docker kill
docker rm

Docker Compose
=======================================
docker-compose

# Delete all stopped containers
docker rm $( docker ps -q -f status=exited)

Tags: 

Pages

Subscribe to dan hagarty.com RSS