-
Notifications
You must be signed in to change notification settings - Fork 60
/
Dockerfile-remote
25 lines (23 loc) · 1.13 KB
/
Dockerfile-remote
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
# podman build base
FROM golang:1.22-alpine3.20 AS podmanbuildbase
RUN apk add --update --no-cache git make gcc pkgconf musl-dev \
btrfs-progs btrfs-progs-dev libassuan-dev lvm2-dev device-mapper \
glib-static libc-dev gpgme-dev protobuf-dev protobuf-c-dev \
libseccomp-dev libseccomp-static libselinux-dev ostree-dev openssl iptables \
bash go-md2man
# podman remote
FROM podmanbuildbase AS podman-remote
RUN apk add --update --no-cache curl
ARG PODMAN_VERSION=v5.3.1
RUN git clone -c advice.detachedHead=false --depth=1 --branch=${PODMAN_VERSION} https://github.com/containers/podman src/github.com/containers/podman
WORKDIR $GOPATH/src/github.com/containers/podman
RUN set -eux; \
make bin/podman-remote LDFLAGS_PODMAN="-s -w -extldflags '-static'"; \
mv bin/podman-remote /usr/local/bin/podman-remote; \
ln -s podman-remote /usr/local/bin/podman; \
ln -s podman-remote /usr/local/bin/docker; \
podman --help >/dev/null; \
[ "$(ldd /usr/local/bin/podman-remote | wc -l)" -eq 0 ] || (ldd /usr/local/bin/podman-remote; false)
FROM alpine:3.20
COPY --from=podman-remote /usr/local/bin /usr/local/bin
RUN adduser -D podman-remote -h /podman -u 1000