debian/Dockerfile
chris 702e60c0a0
All checks were successful
dockers/debian/pipeline/head This commit looks good
fix gosu
2021-10-29 00:18:51 +02:00

47 lines
1.4 KiB
Docker

FROM debian:stable as builder
RUN set -xe;\
apt-get update &&\
apt-get install -y debootstrap &&\
debootstrap --include=apt,ca-certificates,curl --foreign --variant=minbase bullseye /dest &&\
sed -i 's/setup_proc//' /dest/debootstrap/suite-script
FROM scratch as bootstrapped
COPY --from=builder /dest /
RUN set -xe;\
/debootstrap/debootstrap --second-stage &&\
rm -rf /var/cache/apt/archives/* &&\
rm -rf /var/lib/apt/lists/*
FROM bootstrapped as toolbuilder
ENV GOSU_VERSION="1.14"
ENV DUMB_INIT_VERSION="1.2.5"
RUN set -xe;\
apt-get update &&\
apt-get install -y git golang &&\
git clone https://github.com/tianon/gosu.git /build &&\
cd /build &&\
git checkout $GOSU_VERSION &&\
go mod download &&\
go build
RUN set -xe;\
apt-get install -y build-essential &&\
cd / &&\
curl -LO https://github.com/Yelp/dumb-init/archive/v${DUMB_INIT_VERSION}.tar.gz &&\
tar xvzf v${DUMB_INIT_VERSION}.tar.gz &&\
cd dumb-init-${DUMB_INIT_VERSION} &&\
make &&\
cp dumb-init /
FROM bootstrapped
ARG DATE
ENV GOSU_VERSION="1.12"
ENV DUMB_INIT_VERSION="1.2.3"
COPY --from=toolbuilder /build/gosu /usr/local/sbin/gosu
COPY --from=toolbuilder /dumb-init /usr/local/sbin/dumb-init
COPY apt-install /bin/apt-install
COPY checkupdates /bin/checkupdates
CMD "bash"
LABEL version.debian=bullseyen \
version.gosu=$GOSU_VERSION \
version.dumb-init=$DUMB_INIT_VERSION \
build.date=$DATE