-
Notifications
You must be signed in to change notification settings - Fork 231
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
Image buildx CLI arguments #85
Comments
I guess I'd have preferred |
Yeah, that's exactly the issue. Docker builds also support "args". Keeping it under |
We could call it: |
Found my way here because I am updating some of our internal features to the latest spec. I would be amazing if there was some way to pass GitHub Secrets (repo or org scope) during each feature that needs it. For example, we could clone other private repos, pre install packages (npm, ruby) from other private repos. |
@metaskills For Codespaces, secrets are set as environment variables during the docker build which can be referenced in the devcontainer.json as follows. I believe this could be used to extend down into the feature
I created https://github.com/jkeech/codespaces-docker-args and set a Codespaces secret on that repo called The only thing to be careful of is that the any docker From https://docs.docker.com/engine/reference/builder/#arg:
|
Thanks! This is useful, but as I understand it I am personally blocked from using this sweet hack in few ways:
But once these are done I would gladly entertain that method. |
@metaskills (1) should not be required for Codespaces. That's more about local or other VMs. (3) should just require a priv update - commented there. |
This would be a very welcome addition. Has there been any internal discussion or movement on this topic? microsoft/vscode-remote-release#3545 is still continuing to get upvotes and attention... |
Would it be possible to also include using docker buildx bake has well? Bake as slightly more features than just cli arguments. It would be really useful in my use case where we use it to build containers. Thanks |
Related to #74 and #18, as devcontainer.json drives builds for images that are self-contained there is an increasing likelihood for developers to need to be able to apply build time arguments not supported directly by the dev container CLI.
microsoft/vscode-remote-release#3545 has continued to gain up-votes and has several examples of this problem:
--ssh=default
--add-host=archive.ubuntu.com:160.26.2.187
--network=host
The common theme here is network access for the build itself. One option is to try to adopt all of these types of arguments under the
build
property, but there's a risk of always being out of date. Other examples include:--secret
)People are going so far as to use
initalizeCommand
to do the build instead of using built in support due to these gaps.While
secret
in particular could be added to the spec, we likely need a "safety valve". Therefore, I'd propose we include abuild.cliArgs
property. similar torunArgs
, but focused on the CLI arguments of buildx instead.Popular arguments should be moved into the spec itself (like #2 for runArgs), but this provides an interim solution and a way to handle less common scenarios.
The text was updated successfully, but these errors were encountered: