alpine/Dockerfile
chris 89bd5d73e1
Some checks failed
dockers/alpine/pipeline/head There was a failure building this commit
3.13.0
2021-01-14 18:39:35 +01:00

24 lines
1 KiB
Docker

FROM alpine as build
ARG VERSION
ENV ALPINE_SERIES 3.13
ENV ALPINE_MIRROR https://ftp.halifax.rwth-aachen.de/alpine/v${ALPINE_SERIES}
ENV ALPINE_ARCH x86_64
WORKDIR /root
RUN set -xo pipefail; apk add --no-cache curl gnupg &&\
curl -LO ${ALPINE_MIRROR}/releases/${ALPINE_ARCH}/alpine-minirootfs-${VERSION}-${ALPINE_ARCH}.tar.gz &&\
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 &&\
mkdir /dest &&\
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
FROM scratch
ARG VERSION
ARG DATE
COPY --from=build /dest /
RUN apk add --no-cache ca-certificates curl
CMD ["/bin/sh"]
LABEL version.alpine=$VERSION build.date=$DATE