Skip to content

Pass DOCKER_HOST environment variable#212

Open
hoppe-and-dreams wants to merge 2 commits intoeclipse-score:mainfrom
hoppe-and-dreams:dockerhost
Open

Pass DOCKER_HOST environment variable#212
hoppe-and-dreams wants to merge 2 commits intoeclipse-score:mainfrom
hoppe-and-dreams:dockerhost

Conversation

@hoppe-and-dreams
Copy link
Contributor

Adds a pass-through for the DOCKER_HOST environment variable, allowing users to specify a custom Docker host.

This enables rootless Docker setups.

.bazelrc Outdated
test --sandbox_tmpfs_path=/tmp

# Pass through DOCKER_HOST to support custom Docker setups, in particular rootless Docker
test --test_env=DOCKER_HOST
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only required for integration tests IMHO.
I would prefer a way to only set this for integration tests that run with the docker environment. The more variables we leak into our sandbox the less hermetic we are.

See https://bazel.build/reference/be/common-definitions#test.env_inherit and add that to

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Did update. Now local to integration tests. Please check new approach :)

Now env_inherit attributes passed ot py_test are now also respected in
run_as_exec macro
Adds a pass-through for the DOCKER_HOST environment variable for
docker-based (integration) tests.

This enables e.g. rootless Docker setups.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants