New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: ARCH statement in builder #18383
Comments
if we're going to add some kind of conditional logic I would prefer if we made it more feature-rich and add real But of course, the Dockerfile syntax is frozen for now :-) |
@tiborvass Interested in your opinion here too. Thanks. |
@jfrazelle @mikedougherty as this was thought of in the context of CI flakiness debugging. |
@jhowardmsft thanks for the ping. This is interesting! There definitely seems to be a need for this functionality, but something about the boolean/conditional syntax has a bad smell to me. Even sprinkling in |
I think having multiple architectures (the example here looks more related to different operating systems) might become very confusing in a single Dockerfile, especially in cases where windows and linux are mixed. I think so far consensus was to use different Dockerfiles. Having said that; if only small differences are needed, could we resolve this with build-time args? #15182 |
I'm going to close it because everyone lost interest. Feel free to open again if it's still a problem. |
@LK4D4 Absolutely, right call 😄 |
Currently, it's not possible to have a cross-architecture dockerfile. This can be evidenced by the docker CI itself where the main image built downloads busybox (linux/amd64) in the dockerfile. Subsequently hoops are jumped through during test-integration-cli which ends up in .ensure-frozen-images to download/update/tag the linux/arm images to ARM specific ones.
This architecture problem obviously also applies to Windows as well, but is not a Windows specific proposal. I suggest using golang build-style directive-type syntax as a preface to a command. So a dockerfile might contain something like
or some more complex examples using the golang type and/or syntax
The text was updated successfully, but these errors were encountered: