Skip to content

Instantly share code, notes, and snippets.

@lordgift
Created October 25, 2018 07:37
Show Gist options
  • Save lordgift/c3370b8788ea8050434dc6c1e04e03c8 to your computer and use it in GitHub Desktop.
Save lordgift/c3370b8788ea8050434dc6c1e04e03c8 to your computer and use it in GitHub Desktop.
network config for docker containers via Docker Compose
version: '3.7'
services:
sonarqube:
image: sonarqube
ports:
- 9000:9000
- 9092:9092
networks:
testing_net:
ipv4_address: 172.28.1.1
jenkins:
image: jenkins
ports:
- 8080:8080
- 50000:50000
volumes:
- type: bind
source: D:/ProjectWorkspace
target: /project
extra_hosts:
- "sonar:172.28.1.1"
depends_on:
- sonarqube
networks:
testing_net:
ipv4_address: 172.28.1.2
networks:
testing_net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment