-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
48 lines (40 loc) · 1.11 KB
/
Dockerfile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM golang:1.13.6-alpine3.11 AS build
ENV BUILDAH_VER=1.14.1
RUN apk update \
&& \
apk add --no-cache \
gcc \
musl-dev \
libassuan-dev \
libc-dev \
gpgme-dev \
libseccomp-dev \
libselinux-dev \
ostree-dev \
btrfs-progs-dev \
lvm2-dev \
&& \
wget -O buildah.zip "https://github.com/containers/buildah/archive/v${BUILDAH_VER}.zip" \
&& \
unzip buildah.zip \
&& \
mkdir -p src/github.com/containers/ \
&& \
mv "buildah-${BUILDAH_VER}" src/github.com/containers/buildah
WORKDIR src/github.com/containers/buildah
RUN GO111MODULE=on go build -mod=vendor -o buildah ./cmd/buildah
FROM alpine:3.11
COPY --from=build /go/src/github.com/containers/buildah/buildah /
COPY registries.conf /etc/containers/
COPY policy.json /etc/containers/
RUN apk update \
&& \
apk add --no-cache \
gpgme \
lvm2 \
ca-certificates \
&& \
wget -O /usr/bin/runc https://github.com/opencontainers/runc/releases/download/v1.0.0-rc10/runc.amd64 \
&& \
chmod +x /usr/bin/runc
ENTRYPOINT ["/buildah"]