I'm trying to make docker-compose run through system proxy, and according to docker compose file doc
network option could be added in compose file like this:
build:
context: .
network: host
And my compose file looks like this:
version: '3'
services:
flasky:
build:
context: "."
network: host
args:
- http_proxy
- https_proxy
ports:
- "8000:5000"
env_file: .env
restart: always
links:
- mysql:dbserver
- elasticsearch:elasticsearch
mysql:
image: "mysql/mysql-server:5.7"
env_file: .env-mysql
restart: always
elasticsearch:
image: "docker.elastic.co/elasticsearch/elasticsearch:7.8.0"
env_file: .env-es
restart: always
When trying to run "docker-compose up", I get the following error:
ERROR: The Compose file './docker-compose.yml' is invalid because:
services.flasky.build contains unsupported option: 'network'
I think i did exactly as the example in doc, no ideas what is wrong here. Any help?