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

How to pass external binaries as docker build context to dockerfile #1989

Closed
xerothermic opened this issue Dec 6, 2019 · 3 comments
Closed
Assignees
Labels
containers Issue in vscode-remote containers *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster

Comments

@xerothermic
Copy link

I have a use case where I need to copy private libraries as artifacts to my docker image. I see in the devcontainer.json we can specify context, but AFAICT, it can only refer to files that are also check in to the git repository. Currently, these binary artifacts are store either in Azure storage blob or Azure DevOps build artifact.

What is the recommended way to pass binary files for Dockerfile to consume?

One way I can see this work is if we support PreCreCommand like in #1045 so we can pull down the necessary files before invoking docker build. Any other suggestion?

@aeschli aeschli added the containers Issue in vscode-remote containers label Dec 9, 2019
@chrmarti
Copy link
Contributor

The Dockerfile's ADD instruction supports URLs. The "context" property should be able to point outside the Git repository's folders, have you tried that?

@chrmarti chrmarti self-assigned this Dec 10, 2019
@chrmarti chrmarti added the info-needed Issue requires more information from poster label Dec 10, 2019
@xerothermic
Copy link
Author

Hi @chrmarti,

Yes, I know ADD instruction supports URL, but the file I want to retrieve requires authentication (from Azure storage blob). I'm thinking to use SAS Token to download specific artifacts but am unsure how to pass secret to the devcontainers

@chrmarti
Copy link
Contributor

#46 tracks the request for supporting build args and multi-stage builds.

Also check if pointing the context at a download folder would work for you.

Closing as duplicate of #46.

@chrmarti chrmarti added the *duplicate Issue identified as a duplicate of another issue(s) label Dec 13, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
containers Issue in vscode-remote containers *duplicate Issue identified as a duplicate of another issue(s) info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants