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

fix: when docker build in arm or other not amd64 env. #2492

Merged
merged 2 commits into from
Jan 9, 2023
Merged

fix: when docker build in arm or other not amd64 env. #2492

merged 2 commits into from
Jan 9, 2023

Conversation

yanggangtony
Copy link
Contributor

Signed-off-by: yanggang gang.yang@daocloud.io

What this PR does / why we need it:
/kind bug

Special notes for your reviewer:
When build in arm env , will error , because the RUN curl oras , yg have the constant string 'amd64'.

oras >=0.11.1 , have the arm libs.
yg release also have the arm libs.

Signed-off-by: yanggang <gang.yang@daocloud.io>
@yanggangtony yanggangtony changed the title fix when docker build in arm or other not amd64 env. fix: when docker build in arm or other not amd64 env. Jan 4, 2023
Copy link
Member

@ritazh ritazh left a comment

Choose a reason for hiding this comment

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

LGTM

@ritazh ritazh requested a review from a team January 4, 2023 16:57
@@ -32,12 +32,12 @@ RUN curl -sSLO https://github.com/bats-core/bats-core/archive/v${BATS_VERSION}.t
bash bats-core-${BATS_VERSION}/install.sh /usr/local

# Install ORAS
RUN curl -SsLO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_amd64.tar.gz && \
RUN curl -SsLO https://github.com/oras-project/oras/releases/download/v${ORAS_VERSION}/oras_${ORAS_VERSION}_linux_${arch}.tar.gz && \
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

@yanggangtony yanggangtony Jan 5, 2023

Choose a reason for hiding this comment

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

thanks for the advice.
I search the web , docker automatic-platform-args-in-the-global-scope.
It says

Automatic platform ARGs in the global scope
This feature is only available when using the [BuildKit](https://docs.docker.com/build/buildkit/) backend.

perhaps in docker build mod , it will no works for ..

Copy link
Contributor

@maxsmythe maxsmythe left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM, pending sozercan@'s thumbs up

@sozercan sozercan merged commit 85f543c into open-policy-agent:master Jan 9, 2023
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

Successfully merging this pull request may close these issues.

None yet

4 participants