- Community Edition (CE)
- Enterprise Edition (EE)
Install includes:
- Docker Engine
- Docker CLI client
- Docker Compose
- Docker Machine
- Kitematic
Commands
docker start / stop
docker ps -a
docker images
docker images | wc -l
docker rmi $(docker images -a -q)
docker run -d -p <host>:<container> --name <containerName>
Troubleshoot
docker logs <containerID>
docker logs <containerName>
docker exec -it <containerID> /bin/bash
Network
docker network ls
mongoDB and mongo Express
docker network create mongo-network
docker run -d \
-p 27017:27017 \
-e MONGO_INITDB_ROOT_USERNAME=admin \
-e MONGO_INITDB_ROOT_PASSWORD=password \
--name mongodb \
--net mongo-network \
mongo
docker run -d \
-p 8081:8081 \
-e ME_CONFIG_MONGODB_ADMINUSERNAME=admin \
-e ME_CONFIG_MONGODB_ADMINPASSWORD=password \
--name mongo-express \
--net mongo-network \
-e ME_CONFIG_MONGODB_SERVER=mongodb \
mongo-express
browse to mogo-express:
http://localhost:8081