Skip to content

How to specify image tag/digest at build time #1882

Answered by carolynvs
madrum asked this question in Q&A
Discussion options

You must be logged in to vote

We are working on adding build argument support for the v1 release (in #1789, #1769 and #1124). Until that's implemented, you will need to use tools like sed to edit the porter.yaml as a stopgap measure.

Once it is in place you should be able to use this:

porter build --custom myimageDigest sha256:abc123

name: mybundle

custom:
  myimageDigest: "sha256:85b1a9b4b60a4cf73a23517dad677e64edf467107fa7d58fce9c50e6a3e4c914" # default digest to use

images:
  myimage:
      description: "A simple web service"
      imageType: "docker"
      repository: "jeremyrickard/devops-days-msp"
      digest: "{{bundle.custom.myimageDigest}}"

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@madrum
Comment options

@DevOpsDrum
Comment options

@DevOpsDrum
Comment options

Answer selected by madrum
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants