alpine/Dockerfile

25 lines
1.0 KiB
Docker
Raw Normal View History

2018-11-25 21:25:08 +00:00
FROM alpine as build
2019-01-30 18:50:13 +00:00
ARG VERSION
2021-11-28 19:03:30 +00:00
ENV ALPINE_SERIES 3.15
2020-05-31 14:29:11 +00:00
ENV ALPINE_MIRROR https://ftp.halifax.rwth-aachen.de/alpine/v${ALPINE_SERIES}
2018-11-22 12:14:28 +00:00
ENV ALPINE_ARCH x86_64
2019-01-30 18:50:13 +00:00
2018-11-25 21:25:08 +00:00
WORKDIR /root
2020-05-23 14:48:02 +00:00
RUN set -xo pipefail; apk add --no-cache curl gnupg &&\
2019-01-30 18:50:13 +00:00
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
2021-01-14 17:44:14 +00:00
#curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc &&\
#gpg --keyserver pool.sks-keyservers.net --recv 0482D84022F52DF1C4E7CD43293ACD0907D9495A &&\
#gpg --verify alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz.asc alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
2018-11-25 21:25:08 +00:00
mkdir /dest &&\
2019-01-30 18:50:13 +00:00
tar -C /dest -xvzf alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
sed -i "s#http://dl-cdn.alpinelinux.org/alpine/v${ALPINE_SERIES}#${ALPINE_MIRROR}#g" /dest/etc/apk/repositories
2018-11-25 21:25:08 +00:00
FROM scratch
2019-11-16 15:20:24 +00:00
ARG VERSION
2020-05-31 14:29:11 +00:00
ARG DATE
2018-11-25 21:25:08 +00:00
COPY --from=build /dest /
2020-05-31 14:34:45 +00:00
RUN apk add --no-cache ca-certificates curl
2018-11-22 12:14:28 +00:00
CMD ["/bin/sh"]
2020-05-31 14:29:11 +00:00
LABEL version.alpine=$VERSION build.date=$DATE