-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.skopeo
33 lines (30 loc) · 940 Bytes
/
Dockerfile.skopeo
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# First stage: Build Skopeo in a fully equipped Alpine environment
FROM alpine:edge AS builder
# Install build tools and dependencies
RUN apk add --no-cache \
git \
go \
make \
gcc \
libc-dev \
pkgconfig \
btrfs-progs-dev \
gpgme-dev \
libassuan-dev \
libgpg-error-dev \
libseccomp-dev \
bash \
jq \
curl
# Set up Go workspace
WORKDIR /go/src/github.com/containers/skopeo
# Clone Skopeo source & Vendor all Go dependencies & Build Skopeo binary
RUN git clone https://github.com/containers/skopeo.git .\
&& SKOPEO_VERSION=$(curl -s https://api.github.com/repos/containers/skopeo/releases/latest | jq -r .tag_name)\
&& git checkout tags/${SKOPEO_VERSION} -b build-branch\
&& sed -i "s/^GIT_COMMIT := .*/GIT_COMMIT := ''/" Makefile\
&& make vendor\
&& make bin/skopeo\
&& cp bin/skopeo /skopeo_amd64\
&& make bin/skopeo.linux.arm64\
&& cp bin/skopeo.linux.arm64 /skopeo_arm64