Skip to content

Commit 0bb64e2

Browse files
committed
Link podman against musl #3059
1 parent 82a230f commit 0bb64e2

File tree

1 file changed

+33
-25
lines changed

1 file changed

+33
-25
lines changed

tools/podman/Dockerfile.template

+33-25
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ FROM ghcr.io/uniget-org/tools/make:latest AS make
55
FROM ghcr.io/uniget-org/tools/go-md2man:latest AS go-md2man
66
FROM ghcr.io/uniget-org/tools/cni:latest AS cni
77

8-
FROM ghcr.io/uniget-org/images/ubuntu:22.04 AS prepare
8+
FROM ghcr.io/uniget-org/images/build-base:3.19 AS prepare
99
COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
1010
/etc/profile.d/ \
1111
/etc/profile.d/
@@ -14,35 +14,43 @@ COPY --link --from=go / /usr/local/
1414
COPY --link --from=make / /usr/local/
1515
COPY --link --from=go-md2man / /usr/local/
1616
COPY --link --from=cni / /usr/local/
17-
WORKDIR /tmp/podman
18-
ARG name
19-
ARG version
2017
RUN <<EOF
21-
apt-get update
22-
apt-get -y install --no-install-recommends \
23-
git \
24-
ca-certificates \
18+
apk add --update-cache --no-cache \
2519
gcc \
26-
btrfs-progs \
27-
iptables \
20+
pkgconf \
21+
musl-dev \
22+
btrfs-progs \
23+
btrfs-progs-dev \
2824
libassuan-dev \
29-
libbtrfs-dev \
30-
libc6-dev \
31-
libdevmapper-dev \
32-
libglib2.0-dev \
33-
libgpgme-dev \
34-
libgpg-error-dev \
35-
libprotobuf-dev \
36-
libprotobuf-c-dev \
37-
libseccomp-dev \
38-
libselinux1-dev \
39-
libsystemd-dev \
40-
pkg-config \
41-
uidmap
25+
lvm2-dev \
26+
device-mapper \
27+
glib-static \
28+
libc-dev \
29+
gpgme-dev \
30+
protobuf-dev \
31+
protobuf-c-dev \
32+
libseccomp-dev \
33+
libseccomp-static \
34+
libselinux-dev \
35+
ostree-dev \
36+
openssl \
37+
iptables \
38+
bash \
39+
grep
4240
cp -r /usr/local/libexec/cni/ /usr/lib/
4341
EOF
44-
RUN git clone --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/containers/podman .
45-
RUN make -j$(nproc) EXTRA_LDFLAGS="-s -w -extldflags=-static"
42+
WORKDIR /tmp/podman
43+
ARG name
44+
ARG version
45+
RUN <<EOF
46+
git clone --config advice.detachedHead=false --depth 1 --branch "v${version}" https://github.com/containers/podman .
47+
go get -u github.com/mattn/go-sqlite3
48+
go mod vendor
49+
EOF
50+
RUN <<EOF
51+
export CGO_ENABLED=1
52+
make -j$(nproc) LDFLAGS_PODMAN="-s -w -extldflags '-static'" BUILDTAGS='seccomp selinux apparmor exclude_graphdriver_devicemapper containers_image_openpgp systemd'
53+
EOF
4654
RUN <<EOF
4755
make install DESTDIR="${prefix}" PREFIX=""
4856
mkdir -p \

0 commit comments

Comments
 (0)