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 build from subdirectory when using Dockerfile.dazel #32

Open
drigz opened this issue Jan 10, 2018 · 0 comments
Open

Can't build from subdirectory when using Dockerfile.dazel #32

drigz opened this issue Jan 10, 2018 · 0 comments

Comments

@drigz
Copy link

drigz commented Jan 10, 2018

If you put a Dockerfile.dazel at the root of your workspace, you can build from the workspace root and everything works nicely. If, however, you cd into a subdirectory and invoke dazel build, dazel will try to pull the default dazel/dazel image instead of using the Dockerfile.dazel.

This appears to be because the workspace path is not joined to the dockerfile variable (source).

It can be worked around by adding the following to .dazelrc at the workspace root:

import dazel
DAZEL_DOCKERFILE = os.path.join(
    dazel.DockerInstance._find_workspace_directory(),
    "Dockerfile.dazel")

But this is obviously fragile.

dazel also appears to create a .dazel_run file in the subdirectory in this case, but this just results in an unnecessary file and and a one-time unnecessary container restart.

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