forked from youki-dev/youki
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use dockerfile to build skopeo version 1.13.0
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# ref https://github.com/containers/skopeo/issues/1648#issuecomment-1132161659 | ||
FROM golang:1.20 AS skopeo-build | ||
|
||
WORKDIR /usr/src/skopeo | ||
|
||
ARG SKOPEO_VERSION="1.13.1" | ||
RUN curl -fsSL "https://github.com/containers/skopeo/archive/v${SKOPEO_VERSION}.tar.gz" \ | ||
| tar -xzf - --strip-components=1 | ||
|
||
RUN CGO_ENABLED=0 DISABLE_DOCS=1 make BUILDTAGS=containers_image_openpgp GO_DYN_FLAGS= | ||
|
||
RUN ./bin/skopeo --version | ||
|
||
|
||
FROM scratch AS skopeo-rootfs | ||
|
||
COPY --from=skopeo-build /usr/src/skopeo/bin/skopeo /usr/local/bin/ | ||
COPY --from=skopeo-build /usr/src/skopeo/default-policy.json /etc/containers/policy.json | ||
|
||
|
||
FROM scratch | ||
|
||
COPY --from=skopeo-rootfs / / |