Created
December 10, 2021 13:05
-
-
Save markwylde/5c9a4e3ec97d98e4718f24e18014f5ad to your computer and use it in GitHub Desktop.
Docker mongodb instance with custom network
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
mongo: | |
image: mongo | |
restart: always | |
ports: | |
- 27017:27017 | |
environment: | |
MONGO_INITDB_ROOT_USERNAME: root | |
MONGO_INITDB_ROOT_PASSWORD: example | |
networks: | |
default: | |
driver: bridge | |
ipam: | |
config: | |
- subnet: 172.16.57.0/24 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment