-
Notifications
You must be signed in to change notification settings - Fork 327
plugin/docker: add multi-stage target config #1992
Conversation
bc61353
to
d769572
Compare
d769572
to
566d54b
Compare
Noticed that the CI was failing on website-mdx, but when I ran |
@radriaanse can you add a changelog entry? You'll see lots of examples in our |
566d54b
to
63b677e
Compare
@radriaanse - ah yes, we should document how to set this up. Right now we have a node package that trims out all of the extra single quote/double quote changes from running that command from our website team. Kind of a weird situation, but just committing the docker plugin markdown looks fine to me! 👍🏻 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening the PR to add this @radriaanse! I've left a few comments just to fix the variable casing for target
. A question I had was what happens when we pass --target ""
to docker or img? Does it act like a no-op and ignore the flag?
Docker and Img can stop the build at the specified target stage. If not set the full Dockerfile will be build. Closes: hashicorp#1969
63b677e
to
eb6703e
Compare
Wooeps, I've missed that; fixed! @briancain
Yes it does indeed just ignore it / builds all stages: FROM docker.io/library/alpine as stage1
ENV a=1
FROM stage1 as stage2
ENV a=2 Without a target parameter:
With a target parameter:
on the CLI
|
Docker and Img can stop the build at the specified target stage.
If not set the full Dockerfile will be build.
Closes: #1969