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

Support additional Docker build options #85

Closed
sanyer opened this issue Jul 15, 2022 · 6 comments
Closed

Support additional Docker build options #85

sanyer opened this issue Jul 15, 2022 · 6 comments
Assignees
Labels
feature-request New feature or request

Comments

@sanyer
Copy link

sanyer commented Jul 15, 2022

It would be a great and useful ability to add extra args to docker build command.
It seems there is already a variable additionalBuildArgs in the code for this at https://github.com/devcontainers/cli/blob/6d18acf/src/spec-node/singleContainer.ts#L143

The two main use cases for myself are adding --progress=plan and --secret arguments.
Of course, I can do it myself by executing docker build outside the vscode, but it is not the same.

@chrmarti chrmarti added the feature-request New feature or request label Jul 19, 2022
@ontoneio
Copy link

ontoneio commented Aug 2, 2022

I would like to second this. Running into an issue where I would like to provide runtime environment BUILD_ARGS. Dates and dynamic versioning type metadata that seems to be difficult to implement with the current API.

@rastislav-vcrs
Copy link

+1 on this. My use-case is around network isolation. Due to network settings I need to use host network and not default container network while building. Requires --network=host to be supplied for build argument to reach out to internet.

@rastislav-vcrs
Copy link

Any update on this?

@ericfeunekes
Copy link

Adding my +1. I'm building a bunch of centrally managed devcontainers for my team and would like to dynamically create containers for different runtime versions that are passed to something similar to Docker build args.

In an ideal world the devcontainer args could be used in any field so that I could, for example specify a different base image or base image tag based on incoming args. Not the end of the world if it's just a pass through to docker though since you could get the same effect by creating a Dockerfile and passing the args through.

currently I have a single base image with my build args set, then I have to create a separate devcontainer.json for each runtime version that I want to support.

@chrmarti chrmarti self-assigned this Jan 15, 2024
@chrmarti chrmarti added this to the December / January 2024 milestone Jan 15, 2024
@chrmarti
Copy link
Contributor

Implementing proposal devcontainers/spec#328 here.

@chrmarti chrmarti changed the title add a way of supplying additional docker build args Support additional Docker build options Jan 15, 2024
@chrmarti chrmarti added plan-item A plan item and removed plan-item A plan item labels Jan 15, 2024
@chrmarti
Copy link
Contributor

Available in the Dev Containers CLI 0.56.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants