Skip to content

Is devcontainers/ci expected to mount repo while building the image? #44

Answered by Chuxel
lmilbaum asked this question in Q&A
Discussion options

You must be logged in to vote

When building an image, the context is relative to the location of devcontainer.json. Since this is typically in the .devcontainer folder, you'll want to set "context": ".." to be able to pull in content from the repo root via COPY.

"build": {
    "dockerfile": "Dockerfile",
    "context": ".."
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@lmilbaum
Comment options

Answer selected by lmilbaum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants