alpine-s6/Containerfile

45 lines
1.3 KiB
Docker

FROM docker.io/alpine:3.19 AS builder
LABEL maintainer="Sebastian Hugentobler <sebastian@vanwa.ch>"
RUN apk --no-cache add \
curl \
tar \
xz
RUN mkdir /overlay
ENV S6_OVERLAY_VERSION=v3.1.6.2
ENV S6_HASH_noarch=05af2536ec4fb23f087a43ce305f8962512890d7c71572ed88852ab91d1434e3
ENV S6_HASH_aarch64=3fc0bae418a0e3811b3deeadfca9cc2f0869fb2f4787ab8a53f6944067d140ee
ENV S6_HASH_x86_64=95081f11c56e5a351e9ccab4e70c2b1c3d7d056d82b72502b942762112c03d1c
RUN curl -L -O https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-noarch.tar.xz
RUN echo "$S6_HASH_noarch s6-overlay-noarch.tar.xz" | sha256sum -c - || exit 1
RUN tar xf s6-overlay-noarch.tar.xz -C /overlay --strip 1
RUN curl -L -O https://github.com/just-containers/s6-overlay/releases/download/$S6_OVERLAY_VERSION/s6-overlay-$(arch).tar.xz
RUN eval "echo \"\${S6_HASH_$(arch)} s6-overlay-$(arch).tar.xz\" | sha256sum -c -" || exit 1
RUN tar xf s6-overlay-$(arch).tar.xz -C /overlay --strip 1
FROM docker.io/alpine:3.19
ENV LANG=en_US.UTF-8
ENV S6_KEEP_ENV=1
ENV PATH="$PATH:/command"
ENV S6_GLOBAL_PATH="$PATH"
COPY --from=builder /overlay /
RUN apk --no-cache add \
syslog-ng \
tzdata
ENV TZ=Europe/Zurich
RUN apk --no-cache upgrade --ignore alpine-baselayout
ADD /rootfs /
ENTRYPOINT ["/init"]