You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
docker build --target build_stage_target -t build_name .
Running the above command in my pipelines does not produce the desired results. The --target flag is apparently ignored, and the build runs all stages before and after the specified stage.
Is this indeed not supported or could I be doing something wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jason Ryan 👋
In our team we found the answer. This is not a Bitbucket issue, but the Docker itself. BuildKit fixes this bug in multi-stage builds in the legacy docker build engine.
So, just enable the BuildKit by inserting the line
- export DOCKER_BUILDKIT=1
before the docker build command and the image will be built with the specified target.
So simple, bro))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.