Skip to content
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

Containerfile.5.md should document "magic" build-args #1935

Open
cevich opened this issue Mar 26, 2024 · 2 comments
Open

Containerfile.5.md should document "magic" build-args #1935

cevich opened this issue Mar 26, 2024 · 2 comments

Comments

@cevich
Copy link
Member

cevich commented Mar 26, 2024

Podman and buildah (I believe) both support similar/same set of automatic build-args as in the Docker documentation (I'm guessing, so maybe not all are supported?):

  • TARGETPLATFORM - platform of the build result. Eg linux/amd64, linux/arm/v7, windows/amd64.
  • TARGETOS - OS component of TARGETPLATFORM
  • TARGETARCH - architecture component of TARGETPLATFORM
  • TARGETVARIANT - variant component of TARGETPLATFORM
  • BUILDPLATFORM - platform of the node performing the build.
  • BUILDOS - OS component of BUILDPLATFORM
  • BUILDARCH - architecture component of BUILDPLATFORM
  • BUILDVARIANT - variant component of BUILDPLATFORM

In either case, some/all of these should be documented in the Containerfile man page. There are many situations where (esp) knowing (for example) the BUILDARCH is useful in RUN commands. Importantly because it's golang-flavored and difficult to access elsewhere (i.e. uname -m is different).

@rhatdan
Copy link
Member

rhatdan commented Mar 27, 2024

Interested in opening a PR?

@cevich
Copy link
Member Author

cevich commented Mar 27, 2024

I must admit I'm tempted to, I'm simply afraid I may not be able to get to it soon-ish. I'll put it on my TODO list, but if anybody else is inspired to fix this they should go ahead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants