-
Notifications
You must be signed in to change notification settings - Fork 55
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 ORAS tool to Linux ImageBuilder images #1311
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,11 @@ RUN dotnet restore -r linux-musl-$TARGETARCH ./src/Microsoft.DotNet.ImageBuilder | |
COPY . ./ | ||
RUN dotnet publish -r linux-musl-$TARGETARCH ./src/Microsoft.DotNet.ImageBuilder.csproj --self-contained=true --no-restore -o out | ||
|
||
# download oras package tarball | ||
WORKDIR / | ||
RUN oras_version=1.1.0 \ | ||
&& wget https://github.com/oras-project/oras/releases/download/v${oras_version}/oras_${oras_version}_linux_${TARGETARCH}.tar.gz -O oras_linux.tar.gz | ||
|
||
|
||
# build runtime image | ||
FROM mcr.microsoft.com/dotnet/runtime-deps:8.0-alpine | ||
|
@@ -29,4 +34,11 @@ RUN apk add --no-cache \ | |
WORKDIR /image-builder | ||
COPY --from=build-env /image-builder/out ./ | ||
|
||
# install oras tool | ||
COPY --from=build-env /oras_linux.tar.gz ./ | ||
RUN mkdir -p oras-install/ \ | ||
&& tar -zxf oras_linux.tar.gz -C oras-install/ \ | ||
&& mv oras-install/oras /usr/local/bin/ \ | ||
&& rm -rf oras_linux.tar.gz oras-install/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This extraction should be done in the build stage above, then we only need one COPY instruction into There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed with cbb48eb |
||
|
||
ENTRYPOINT ["/image-builder/Microsoft.DotNet.ImageBuilder"] |
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.
An issue should be logged to determine a way to keep this version up-to-date with new releases.
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.
Created an issue to track this: #1313