How to use host network for docker compose?
I want to use docker compose with the host network. I have a docker container that access a local REST api. Usually I run docker run --net=host -p 18080:8080 -t -i containera which can access the host REST api which runs at http://127.0.0.1:8080. Since I want to scale the container containera I found docker compose to scale the container. But the docker compose file from the documentation does not work. The docker container does not query the REST API. I tried the following compose file: version: "3" services: web: image: conatinera:latest network_mode: "host" deploy: replicas: 1 resources: li
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.