-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add support for --network
in Pulumi Docker v4 using BuilderV1
#837
Comments
I would be happy to implement a solution for this. |
That would be great. Do you have a concrete plan how to bring this support to the current V4? If so, let's try to describe it in this issue first. |
@mikhailshilkov no, I don't have a concrete plan. |
I'm actually not sure that the BuilderV1 client option properly supports the |
The issue at https://issuetracker.google.com/issues/227640666 has been marked as "Fixed" but it's not clear what was fixed or how it's supposed to work now... Still, I created a new project using Pulumi Docker v4 but, again, when trying to install a Python package from Artifact Registry, it is unable to acquire the credentials from the metadata server... Following the discussion from docker/buildx#175, it seems that BuildKit now has the |
This adds `--network` and `--add-host` options since those are supported by both builders. (Other requests like #761 will require more thought, since that functionality isn't supported in the v1 API we're using right now.) Two integration tests are included to ensure the behavior with v1 and v2 builders. While I was in here I also added `platform` as an output. Fixes #837. Fixes #862.
I've created a new project using Pulumi Docker v4.5.3 to test the network option but it gave an error:
I'm not sure what is the problem, if it's related to Pulumi Docker or to the buildkit running on Google Cloud Build |
Hello!
Issue details
Similar to #761, the
--network
flag was removed fromdocker.DockerBuild
which is leaving us pinned at v3.I also reported this problem in #424 (comment).
For our case specifically, in Google Cloud when building a Docker image that needs a Python package hosted at Artifact Registry, we need credentials that are accessible from the
cloudbuild
network.From what I understand reading docker/buildx#175, and specifically docker/buildx#175 (comment), BuildKit won't be adding support for custom networks anytime soon and the workaround needs a hard-coded IP from Google's metadata server to be used with the
--add-host
flag.There's also an issue at https://issuetracker.google.com/issues/227640666 that has not been addressed yet.
The other option would be to add the
--network
flag back, to be used with theBuilderV1
.Affected area/feature
The text was updated successfully, but these errors were encountered: