Last active
November 15, 2022 15:17
-
-
Save TheLurps/12c84114e21388a877b233ab1bd9ed42 to your computer and use it in GitHub Desktop.
docker compose start host with external IP
This file contains hidden or 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.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