Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't use Tiltfile's local directive to execure local docker commands when using d8s bec. of overwritten DOCKER_HOST #43

Open
pandorasNox opened this issue Mar 3, 2022 · 0 comments

Comments

@pandorasNox
Copy link

pandorasNox commented Mar 3, 2022

running something like this in a Tiltfile will fail when running d8s up tilt up:

def helmfile_docker(cmd):
  pwd = local("pwd | tr -d '\n' ")
  return local("docker run --rm -w /workdir -v %s:/workdir --entrypoint=bash quay.io/roboll/helmfile:v0.143.0 -c '%s'" % (pwd, cmd) )

a possible solution to that is using unset in the local directive like that:

def helmfile_docker(cmd):
  pwd = local("pwd | tr -d '\n' ")
  return local("unset DOCKER_HOST; docker run --rm -w /workdir -v %s:/workdir --entrypoint=bash quay.io/roboll/helmfile:v0.143.0 -c '%s'" % (pwd, cmd) )

This behaviour is not obvious although understandable as d8s overwrites the DOCKER_HOST.
This should maybe be mentioned in the documentation or handled in some other way?

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

No branches or pull requests

1 participant