https://pulumi.com logo
Title
b

bulky-pencil-51274

03/24/2023, 4:36 PM
hello folks 👋 I'm looking for some guidance on how to build a multi arch docker image. Would anyone have some pointers to the right doc ?
s

stocky-restaurant-98004

03/24/2023, 4:57 PM
try something like
linux/arm/v7,linux/arm64/v8,linux/amd64
for the
platform
argument: https://www.pulumi.com/registry/packages/docker/api-docs/image/#platform_nodejs
b

bulky-pencil-51274

03/24/2023, 5:04 PM
I tried, but this is rejected by the regex :
Error response from daemon: "v8,linux" is an invalid component of "linux/arm64/v8,linux/amd64": platform specifier component must match "^[A-Za-z0-9_-]+$": invalid argument
from https://github.com/pulumi/pulumi-docker/issues/296 I'm guessing that this isn't supported at the moment
s

stocky-restaurant-98004

03/24/2023, 5:06 PM
No, that should be supported. What version of the provider are you using?
b

bulky-pencil-51274

03/24/2023, 5:08 PM
4.1.0
s

stocky-restaurant-98004

03/24/2023, 5:11 PM
I'll ask the engineering team.
As a workaround, you can definitely create 2 single-platform images and combine them with
docker manifest
, which you could call using the Pulumi Command provider.
b

bulky-pencil-51274

03/24/2023, 5:12 PM
I'll try that. thanks a lot
s

stocky-restaurant-98004

03/24/2023, 5:12 PM
It might just be that the validation is too strict.
I know it's not ideal, but this example should give you an idea of the syntax: https://github.com/pulumi/pulumi-docker/issues/296
b

bulky-pencil-51274

03/27/2023, 7:45 AM
I have the manifest creation working using `local.Command`as you suggested. That'll work for now 🙂 thanks.
s

stocky-restaurant-98004

03/27/2023, 2:14 PM
Can you also file an issue here? The intent is definitely that multi-arch build should work. It's either a bug, or it's not sufficiently documented. In either case, Pulumi would like make this smooth: https://github.com/pulumi/pulumi-docker/issues
b

bulky-pencil-51274

03/27/2023, 2:38 PM
sure
s

stocky-restaurant-98004

03/27/2023, 8:21 PM
Ugh. I see that was closed as dupe. That's my fault as I am aware of the referenced issue. I just wasn't sure it was the same issue.
In other news, I just realized that I sent you the wrong link for an example of how to use
docker manifest
. This is what I meant to link you to: https://github.com/pulumi/pulumi-docker-containers/blob/main/.github/workflows/release.yml#L198-L204