Hi y’all, I’m looking for some help with building...
# python
c
Hi y’all, I’m looking for some help with building a docker image. In our docker image we use the docker build
--secret
flag as a way to pass in a file that doesn’t get persisted to the image or image history. I’m not seeing any examples of how to integrate this with
pulumi-docker
. I’ve tried passing secrets in as an arg in the build args but I haven’t been able to get that working. Let me know if anyone has ideas! Docker secret documentation: https://docs.docker.com/build/building/secrets/ I didn’t see a docker specific channel. If there is a better place let me know and I can move this Q over there.
I see that secrets can potentially be passed in using
awsx.ecr.Image
. I could use that approach but the downside there is that I don’t see a way to specify the tag I want to use for the image, which is necessary for my use case So I guess I have two parts to this question: 1. Can
pulumi-docker
images take in build secrets without having to build outside of Pulumi? 2. With
pulumi-awsx
is there a way to specify the image tag to be used?
I wasn’t able to find a solution so I’m just running
subprocess
commands within Pulumi to create and push the image. That is working for now but if there is a more pulumi friendly approach to 1) building and image with the secret built arg and 2) being able to customize the image tag name please let me know
a
+1 also wondering how to add an image tag to an
awsx.ecr.Image