I'm trying to onboard two teams into using dagger. The issue: README.md is starting to get too complicated.
Since there's no dagger configuration that would inject http_proxy vars into the engine or the "runners"(?) you need to bake a custom docker-engine. Since I still don't have a registry I've included a Dockerfile with BUILD_ARG into the .dagger directory and ask people to build the engine locally. So far, almost so good.
Issue is in WSL, not to pass username/pass around, people install local proxies in their Windows host. The only way I've found to access the host from docker on WSL/Linux is to run docker with the dreaded --add-host=host.docker.internal:host-gateway. So they will always have to run the engine "manually" and it would be awesome to configure some aspects of this in the dagger.json file, for example.
Just for future reference, since some people may also need more special configurations, you would need to ask people to run something like:
# every time you would like to run dagger, please be sure that the engine is running with:
docker run --rm -d \
--name dagger-engine-custom \
--privileged \
-v /path/to/cacert.pem:/usr/local/share/ca-certificates/proxy.crt:ro \
-v /path/to/engine.toml:/etc/dagger/engine.toml \
--add-host=host.docker.internal:host-gateway
-e http_proxy=http://host.docker.internal:3128 \
-e https_proxy=http://host.docker.internal:3128 \
-e no_proxy="host.docker.internal,*.internal.corp,localhost,127.0.0.1" \
-e _DAGGER_ENGINE_SYSTEMENV_GOPROXY="https://internal-artifactory.corp/go-proxy/" \
-v /var/lib/dagger \
registry.dagger.io/engine:v0.18.14
And then probably:
export _EXPERIMENTAL_DAGGER_RUNNER_HOST=docker-container://dagger-engine-custom
I know it's 2025... But people don't know how to use Docker still. 😐
How would you simplify these for the general mass?