rancher / dapper

Docker build wrapper
Apache License 2.0
365 stars 88 forks source link

How to pass `--add-host` command to dapper #46

Open Shuliyey opened 6 years ago

Shuliyey commented 6 years ago

when performing docker build, sometimes you need service container running such as mariadb, when doing magento build

e.g.

docker build --add-host mariadb:`docker inspect -f '{{.NetworkSettings.IPAddress}}' mariadb` -t magento_app.

is there a way to pass --add-host to dapper

wkjun commented 3 years ago

reffer https://github.com/rancher/dapper#dapper_run_args

use DAPPER_RUN_ARGS in Dockerfile.dapper

for example:

ENV DAPPER_RUN_ARGS --add-host github.com:52.78.231.108 --add-host kubernetes-charts.storage.googleapis.com:172.217.31.240 --add-host storage.googleapis.com:172.217.31.240