Docker Machine
To start a docker machine:
docker-machine startTo stop a docker machine:
docker-machine stopShow IP address of default docker machine:
docker-machine ip defaultConnect to docker daemon:
eval $(docker-machine env)Connect to docker daemon (Windows equivalent):
@FOR /f "tokens=*" %i IN ('docker-machine env') DO @%iDocker Compose
To build docker-compose file. Images will be downloaded and containers will be created as specified.
docker-compose buildStart the docker containers.
docker-compose up -dDocker Container
To start a docker container:
docker start <container>To stop a docker container:
docker stop <container>Delete a docker container by ID. Force (-f) enables one to delete a running container. You can pass multiple container IDs.
docker rm -f <containers>Show all IDs of running and stopped containers.
docker ps -aqConnect to a shell in the docker container and execute the command.
docker exec -it <container> <command>Docker Images
Show all IDs of docker images.
docker images -aqDelete docker images by ID. Force (-f) enables one to delete an image although others depend on it. You can pass multiple image IDs.
docker rmi -f <images>