-
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
Add ORAS tool to Linux ImageBuilder images #1311
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
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 comment
The 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 /usr/local/bin
- this reduces the number of layers in the image and lets us cross-build without running the extraction steps under QEMU emulation, or lets us move to a distroless base image in the future (#1060).
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.
Fixed with cbb48eb
@@ -16,6 +16,14 @@ 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 \ |
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
Co-authored-by: Logan Bussell <[email protected]>
Add ORAS tooling to Linux Image Builder image.
Used instructions from https://oras.land/docs/installation/ with necessary modification for Alpine, to use
wget
instead ofcurl
.