-
Notifications
You must be signed in to change notification settings - Fork 14
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
[spike] Image
: Implement a selection of extraOptions
#424
Comments
As mentionned here, I do believe that implementing |
I think the In GCP Cloud Build we need access to the |
In #549 a user requested the build use multiple tags and push each of them. |
In #539 a user requested the |
The We use it to clone a GitHub repo inside our Dockerfile (the SSH key is the main means of authentication with GH) |
bump on this. our current image build: const uploaderImage = registryInfo.apply((registryInfo) => new docker.Image(uploaderImageName, {
build: {
context: "../uploader",
// needed for ssh install of our private repo
extraOptions: [
'--ssh', `default=/home/runner/.ssh/id_ed25519`,
],
env: {
DOCKER_BUILDKIT: "1",
},
},
imageName: pulumi.interpolate`${ecrRepo.repositoryUrl}:${imageName}`,
registry: registryInfo,
})); we are also using the SSH key to authenticate with a private GitHub repository. this is blocking us from migrating to 4.x. |
Not having the ability to pass build secrets is really a major drawback for us for moving with the new Docker provider. |
Same problem as @JohnMcGue. This is a blocker for migration. |
@LouisAmon @JohnMcGue @mpuhacz - I'm not sure if this is useful for your particular situations, but you should be able to use |
This would be a breaking change, but this argument is already not working anymore since it was removed from the underlying Docker provider, see pulumi/pulumi-docker#424. Part of #1148
This would be a breaking change, but this argument is already not working anymore since it was removed from the underlying Docker provider, see pulumi/pulumi-docker#424. Part of #1148
This would be a breaking change, but this argument is already not working anymore since it was removed from the underlying Docker provider, see pulumi/pulumi-docker#424. Part of #1148
This would be a breaking change, but this property is already broken since it was removed from the underlying Docker provider, see pulumi/pulumi-docker#424. Part of #1148
Is there any option for the quiet parameter? The verbosity on our processes are generating some collateral effects we could avoid otherwise. |
@rtrindvg Are you using Docker v4.x or v3.x? |
I was using v3.x before, using the quiet parameter on the extraOptions. Now we transitioned to v4.x, because we had an issue of generating a new docker image on every preview, which was slowing down the process, but I see no corresponding way of generating the image without a very large output in some complex building process. |
With v4, you should no longer see a "very large output", do you have an example you can share of a Dockerfile & Pulumi program that produces said output? |
I could reproduce the issue using a simple repository, and also how there are different behavior when using CLI versus the pulumi/actions github CI module. Sample index.ts file: import * as pulumi from "@pulumi/pulumi";
import * as docker from "@pulumi/docker";
const demoImage = new docker.Image("demo-image", {
build: {
context: ".",
dockerfile: "Dockerfile",
platform: "linux/amd64",
},
imageName: "local/demo-verbose-dockerfile:latest",
skipPush: true,
});
export const imageName = demoImage.imageName; Sample Dockerfile: FROM alpine:latest
RUN for i in $(seq 1 1000); do echo "This is a verbose output: line $i"; done Pulumi CLI preview (no issue, even with diff, since the preview does not build the image):
A regular Pulumi CLI up won't have the problem, since the build messages are replaced on the same line on the screen:
... but when I use the diff parameter we have a partial problem, not all expected output is here (since my RUN lines are not shown on the output) but there is still a lot of lines here. In a real Dockerfile, with all the download steps and progress, this is already a lot of output:
Note the verbose output from the RUN command in the docker file somehow is not here, this is the same execution on the CI, using pulumi/actions (with diff: true):
Same execution with diff: false, still very verbose:
I am already using suppress-progress on pulumi/actions (excerpt from my workflow file): ... cut for brevity ...
- name: Pulumi Command
id: pulumi
uses: pulumi/actions@v5.2.2
with:
command: up
stack-name: ${{ inputs.PULUMI_STACK_NAME }}
work-dir: ${{ inputs.WORKING_DIR }}
cloud-url: azblob://pulumi-state?storage_account=<redacted>
comment-on-pr: true
edit-pr-comment: false
diff: ${{ inputs.DIFF }}
upsert: true
secrets-provider: azurekeyvault://<redacted>
suppress-progress: true
env:
ARM_USE_OIDC: true
ARM_CLIENT_ID: ${{ inputs.AZURE_CLIENT_ID }}
ARM_TENANT_ID: ${{ inputs.AZURE_TENANT_ID }}
ARM_SUBSCRIPTION_ID: ${{ inputs.AZURE_SUBSCRIPTION_ID }}
AZURE_KEYVAULT_AUTH_VIA_CLI: true In summary, I need diff for audit purposes, but even without it, since docker v4 I have no way of achieving this without a mess. You can imagine how large Dockerfiles, with unit tests embedded on them, make a lot of lines of output, which in turn makes them almost unusable on the PR comments, since the relevant information is buried on them. Having a more uniform behavior for diff true/false on both CLI and pulumi/actions is a partial win, but I cannot see how to achieve what I need without an explicit way to control the docker build output in some level. Even quiet is not perfect, since we can lose error messages from the docker build process, but it's much better than what we have right now. Hope it reproducible on your side now and somehow this parameter (or another equivalent one) can be provided eventually. |
Definitely, this seems like a feature request for the Pulumi CLI, as it looks like different types of events are logged with If you're able to look into using the Pulumi Cloud backend, you'll see that by integrating with the Pulumi engine, we can toggle between toggle between verbose, diff and diagnostic outputs. Here's what that looks like: Where selecting "Diff" or "Diagnostic" will provide more verbose output, which I think matches what you're seeing. |
Thanks, will open the issue there. But even making this consistent on pulumi CLI, I still believe the need to have the quiet option exposed continues, since the changes on the CLI won't help me at all, since my true issue is on the CI. I will also open an issue on pulumi/actions, to make sure the diff=false scenario is correct (I believe it should not print the progress from docker build), but the need to have the quiet parameter will also persist (since I need diff=true). Unfortunately Pulumi Cloud backend is outside of our budget for now, but it would be perfect, for sure. Thanks for the feedback! |
Hi folks, we just released a new Docker Build provider focused exclusively on building images with buildx/BuildKit. It provides The repository is here; our blog announcement is here; and finally API docs are here along with examples of how to migrate your existing We won't be able to add this functionality in this provider for a number of reasons, so I'm closing this as wont-fix. |
Hello!
Issue details
In v3.x.x, we allow users to set extra options which get passed to the Docker provider as command line flags.
Using the client, these all have to be implemented separately.
extraOptions
extraOptions
fieldThe text was updated successfully, but these errors were encountered: