Skip to content

Commit

Permalink
Use dockerfile to build skopeo version 1.13.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YJDoc2 committed Aug 4, 2023
1 parent 2420782 commit d141b08
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/podman_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ jobs:
uses: taiki-e/install-action@just
- name: Install requirements
run: sudo env PATH=$PATH just ci-prepare
- name: Build latest skopeo # because ubuntu 22.04 does not have latest, and podman tests depend on that
run: docker build -f ./hack/skopeo.Dockerfile . --target skopeo-rootfs --output=/ && skopeo --version
- run: just youki-dev
- run: sudo cp youki /usr/local/bin
- name: Install requirements for Podman
run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev libgpgme-dev bats
run: sudo apt-get install -y pkg-config libsystemd-dev libdbus-glib-1-dev libelf-dev libseccomp-dev libgpgme-dev bats skopeo
- name: Clone podman repository
uses: actions/checkout@v3
with:
Expand Down
23 changes: 23 additions & 0 deletions hack/skopeo.Dockerfile
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 / /

0 comments on commit d141b08

Please sign in to comment.