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

feat: Provide TARGETARCH, TARGETOS, TARGETPLATFORM to docker builds #6233

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rfay
Copy link
Member

@rfay rfay commented May 22, 2024

The Issue

I happened to notice that we kept having to provide ARG TARGETPLATFORM to some Dockerfile recipes

How This PR Solves The Issue

Automatically provide TARGETARCH, TARGETOS, TARGETPLATFORM so people don't need that.

TODO

Manual Testing Instructions

I used this Dockerfile:

RUN printf "TARGETPLATFORM=${TARGETPLATFORM}\nTARGETARCH=${TARGETARCH}\nTARGETOS=${TARGETOS}\n" >/var/lib/targetplatform.txt

And then ran ddev exec at /var/lib/targetplatform.txt after ddev start

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

@rfay rfay requested a review from a team as a code owner May 22, 2024 21:00
Copy link

github-actions bot commented May 22, 2024

Copy link
Member

@stasadev stasadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks great!

Please add these variables to https://ddev.readthedocs.io/en/stable/users/extend/customizing-images/#build-time-environment-variables

And maybe we need an example how use them.

@rfay rfay force-pushed the 20240522_rfay_targetplatform branch from 18d7fe7 to 5d82e5c Compare May 31, 2024 23:11
@rfay rfay marked this pull request as draft June 1, 2024 23:02
@rfay
Copy link
Member Author

rfay commented Jun 1, 2024

Converted to draft. TODO includes:

  • Docs
  • test
  • Example

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

Successfully merging this pull request may close these issues.

None yet

2 participants