-
Notifications
You must be signed in to change notification settings - Fork 387
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
Add concept of a native Dockerfile. #982
Conversation
6f1bf13
to
0f89fee
Compare
The idea behind this is so we can provide native toolchains if the image platform and the cross-compilation target are the same. This simplifies our logic for say,
We might require slightly more complex logic for i586/i686 since the default package we'd install for x86_64 ( |
I'm not sure I understand what this does and how it differs. How is it used? |
Say if I want to build |
with buildkit it's possible to do conditional stages, I think that could help to not use a script file
for example |
In retrospect, I don't think we need a script (just native/non-native) unless we want to support targets where we have to build from source (which I think we can omit) or use Debian repositories only for a different architecture (specifically, MIPS). |
bors try --target x86_64-unknown-linux-gnu |
tryBuild succeeded: |
25e592e
to
33a7a77
Compare
7e07118
to
ddbb2fc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, I'm just not sure I like the naming.
maybe same-platform
?
I'd also like it if with this pr that the image is made available and used when possible.
Based on comments elsewhere, I should clarify that this is not used to publish a When building the image, we change the Dockerfile used for the build. If the image architecture is the same as the target architecture, and the target triple is |
Build failed: |
e5c53fd
to
3d20996
Compare
bors try --target x86_64-unknown-linux-gnu* |
tryBuild succeeded: |
COPY xargo.sh / | ||
RUN /xargo.sh | ||
|
||
ARG TARGETARCH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done after the shared code, which will be nice when creating a base image but also for cached layers even before then.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
forgot about this
looks good
bors r+
bors cancel |
Canceled. |
This allows builds for different architectures to work by using the native, base image native for the built platform. This supported both the Ubuntu and CentOS image bases, and adds a `CROSS_TARGET_TRIPLE` to ensure simplify exported the cargo-specific environment variables for the native images.
88012cf
to
b789e46
Compare
bors r=Emilgardis |
Build failed: |
This target did not change and passed the last time... |
I see no reason for why it would not work now except for some filesystem error lets try again bors r+ |
bors cancel bors retry |
Canceled. |
bors r+ doesn't seem like it got queued https://app.bors.tech/repositories/45789 |
Build succeeded: |
No description provided.