Created
January 29, 2021 09:53
-
-
Save ovuruska/aee7412d67a688a25ebba81955e44e72 to your computer and use it in GitHub Desktop.
Set network mode to achieve port binding at localhost.
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.5" | |
#$ docker run -d -p 6379:6379 redis | |
services: | |
redis: | |
image : redis | |
ports: | |
- "6379:6379" | |
api_server: | |
depends_on: | |
- redis | |
build: | |
context: . | |
dockerfile: api.Dockerfile | |
environment: | |
PORT: 8080 | |
ports: | |
- "8080:8080" | |
expose: | |
- "8080" | |
network_mode: host | |
selam_server: | |
build: | |
context: . | |
dockerfile: selam.Dockerfile | |
environment: | |
PORT: 15120 | |
ports: | |
- "15120:15120/udp" | |
expose: | |
- "15120/udp" | |
network_mode: host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment