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

Docker-out-of-Docker Support? #791

Closed
naramore opened this issue Feb 19, 2021 · 1 comment · Fixed by #792
Closed

Docker-out-of-Docker Support? #791

naramore opened this issue Feb 19, 2021 · 1 comment · Fixed by #792

Comments

@naramore
Copy link

If I install the docker client in a container, and pass the host docker socket to it at run-time, then the docker container has access to the host's docker engine. But when I attempt to run earthly from within the docker container, it always fails because it can't mount against the RunPath.

After investigating the code a bit, I found this:

RunPath: defaultRunPath(),

and the RunPath is not configurable.

So the issue is that earthly is executing from within the container which is where it 'looks up' it's RunPath, but when it attempts to mount against that RunPath, unless the container and host have that same path, it fails.

Would it be possible to make the RunPath optionally configurable? Or perhaps some other configuration option to better support running earthly with the Docker-out-of-Docker setup?

This would make running earthly in a VSCode Remote:Container setup much nicer.

Thanks for this awesome project!

@vladaionescu
Copy link
Member

Hi @naramore - it seems that RunPath is actually not really used so we will remove it in the next release. It used to be necessary to make the earthly -i mode working. It now works through a different mechanism.

In any case, until the next release, I think that you can configure the path via the earthly config. In v0.5.2 you can do earthly config global.run_path /some/other/path. Really all that is necessary is for that path to exist on the host that the Docker daemon is running.

I should also say that running Earthly's buildkit as Docker-out-of-Docker is not really supported, but also it should just work. Let us know if you run into other issues!

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 a pull request may close this issue.

2 participants