Docker and CI/CD · Senior · Question 73 of 75

What does the --platform=$BUILDPLATFORM trick in a builder stage achieve?

Explanation

Compile steps run at native speed, using TARGETOS and TARGETARCH to produce output for each target. Only the small final stage is per-platform.

Further reading

Problem with a question

Docker and CI/CD · Senior · question 73

Test yourself

Take the Docker and CI/CD · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz