Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 511 Bytes

docker-commands.md

File metadata and controls

23 lines (20 loc) · 511 Bytes

#commands

create docker network

sudo docker network create mongo-network

start mongodb

sudo docker run -d
-p 27017:27017
-e MONGO_INITDB_ROOT_USERNAME=admin
-e MONGO_INITDB_ROOT_PASSWORD=password
--network mongo-network
--name mongodb
mongo

start mongo-express

sudo docker run -d
-p 8081:8081
-e ME_CONFIG_MONGODB_ADMINUSERNAME=admin
-e ME_CONFIG_MONGODB_ADMINPASSWORD=password
-e ME_CONFIG_MONGODB_SERVER=mongodb
--network mongo-network
--name mongo-express
mongo-express