https://pulumi.com logo
#general
Title
# general
f

future-refrigerator-88869

10/16/2021, 7:21 PM
Hello everyone, I'm trying to build a docker image with multiple tags but I'm not really sure how ? I was able to create the image and push it but I'd like to use more than one tag.
Copy code
new docker.Image("name", {
  build: { context: "../src", },
  imageName: pulumi.interpolate`${repositoryUrl}:tag1`,
  registry: registry,
});
Basically I want to use
-t tag1 -t tag2
from docker build command any ideas ?
b

broad-gold-44713

10/16/2021, 7:47 PM
I use
extraOptions
in the `DockerBuildArgs`https://www.pulumi.com/docs/reference/pkg/docker/image/#dockerbuild. For example:
Copy code
extraOptions: [
    '--pull',
    '--tag',
    pulumi.interpolate`${url}:${branch}`
  ]
🙌 1
f

future-refrigerator-88869

10/17/2021, 11:18 AM
@broad-gold-44713 Thanks for the input. I definitely missed the
extraOptions
being passed to docker build command 😄
👍 1
31 Views