Skip to content

Instantly share code, notes, and snippets.

@TheLurps
Last active November 15, 2022 15:17
Show Gist options
  • Select an option

  • Save TheLurps/12c84114e21388a877b233ab1bd9ed42 to your computer and use it in GitHub Desktop.

Select an option

Save TheLurps/12c84114e21388a877b233ab1bd9ed42 to your computer and use it in GitHub Desktop.
docker compose start host with external IP
---
version: '3.8'
networks:
lan:
driver: ipvlan
driver_opts:
parent: enp0s31f6
ipam:
driver: default
config:
- subnet: 10.0.0.0/24
gateway: 10.0.0.1
ip_range: 10.0.0.3/32
services:
web:
image: nginx:latest
container_name: web
restart: always
networks:
lan:
ipv4_address: 10.0.0.3
ports:
- 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment