Skip to content

Instantly share code, notes, and snippets.

@markwylde
Created December 10, 2021 13:05
Show Gist options
  • Save markwylde/5c9a4e3ec97d98e4718f24e18014f5ad to your computer and use it in GitHub Desktop.
Save markwylde/5c9a4e3ec97d98e4718f24e18014f5ad to your computer and use it in GitHub Desktop.
Docker mongodb instance with custom network
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