Merge pull request #92 from linuxserver/s6-3.1.0.1-jammy

pull/94/head jammy-ce979931-ls23
Adam 2022-06-06 14:42:40 +01:00 zatwierdzone przez GitHub
commit f2a45dda92
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
21 zmienionych plików z 330 dodań i 276 usunięć

Wyświetl plik

@ -3,11 +3,14 @@ FROM alpine:3.15 as rootfs-stage
# environment
ENV REL=jammy
ENV ARCH=amd64
# install packages
RUN \
apk add --no-cache \
bash \
curl \
patch \
tar \
tzdata \
xz
@ -21,6 +24,29 @@ RUN \
/rootfs.tar.gz -C \
/root-out
# set version for s6 overlay
ARG S6_OVERLAY_VERSION="3.1.0.1"
ARG S6_OVERLAY_ARCH="x86_64"
# add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz
# add s6 optional symlinks
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
# copy ci-checks
COPY ci-check/ /root-out/package/admin/s6-overlay-${S6_OVERLAY_VERSION}/etc/s6-rc/sources/top/contents.d
# patch cont-init for docker-mods
COPY patch/ /tmp/patch
RUN patch -u /root-out/package/admin/s6-overlay-${S6_OVERLAY_VERSION}/etc/s6-linux-init/skel/rc.init -i /tmp/patch/package/admin/s6-overlay-@VERSION@/etc/s6-linux-init/skel/rc.init.patch
# Runtime stage
FROM scratch
COPY --from=rootfs-stage /root-out/ /
@ -29,15 +55,6 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="TheLamer"
# set version for s6 overlay
ARG OVERLAY_VERSION="v2.2.0.3"
ARG OVERLAY_ARCH="amd64"
# add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
COPY patch/ /tmp/patch
# set environment variables
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/root" \
@ -90,7 +107,6 @@ RUN \
apt-get install -y \
curl \
gnupg \
patch \
tzdata && \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
@ -101,16 +117,14 @@ RUN \
/app \
/config \
/defaults && \
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
echo "**** cleanup ****" && \
apt-get remove -y patch && \
apt-get autoremove && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
/var/tmp/* \
/var/log/*
# add local files
COPY root/ /

Wyświetl plik

@ -3,11 +3,14 @@ FROM alpine:3.15 as rootfs-stage
# environment
ENV REL=jammy
ENV ARCH=arm64
# install packages
RUN \
apk add --no-cache \
bash \
curl \
patch \
tar \
tzdata \
xz
@ -21,6 +24,29 @@ RUN \
/rootfs.tar.gz -C \
/root-out
# set version for s6 overlay
ARG S6_OVERLAY_VERSION="3.1.0.1"
ARG S6_OVERLAY_ARCH="aarch64"
# add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz
# add s6 optional symlinks
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
# copy ci-checks
COPY ci-check/ /root-out/package/admin/s6-overlay-${S6_OVERLAY_VERSION}/etc/s6-rc/sources/top/contents.d
# patch cont-init for docker-mods
COPY patch/ /tmp/patch
RUN patch -u /root-out/package/admin/s6-overlay-${S6_OVERLAY_VERSION}/etc/s6-linux-init/skel/rc.init -i /tmp/patch/package/admin/s6-overlay-@VERSION@/etc/s6-linux-init/skel/rc.init.patch
# Runtime stage
FROM scratch
COPY --from=rootfs-stage /root-out/ /
@ -29,15 +55,6 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="TheLamer"
# set version for s6 overlay
ARG OVERLAY_VERSION="v2.2.0.3"
ARG OVERLAY_ARCH="aarch64"
# add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
COPY patch/ /tmp/patch
# set environment variables
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/root" \
@ -90,7 +107,6 @@ RUN \
apt-get install -y \
curl \
gnupg \
patch \
tzdata && \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
@ -101,21 +117,19 @@ RUN \
/app \
/config \
/defaults && \
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
echo "**** add qemu ****" && \
curl -o \
/usr/bin/qemu-aarch64-static -L \
"https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static" && \
chmod +x /usr/bin/qemu-aarch64-static && \
echo "**** cleanup ****" && \
apt-get remove -y patch && \
apt-get autoremove && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
/var/tmp/* \
/var/log/*
# add local files
COPY root/ /

Wyświetl plik

@ -3,11 +3,14 @@ FROM alpine:3.15 as rootfs-stage
# environment
ENV REL=jammy
ENV ARCH=armhf
# install packages
RUN \
apk add --no-cache \
bash \
curl \
patch \
tar \
tzdata \
xz
@ -21,6 +24,29 @@ RUN \
/rootfs.tar.gz -C \
/root-out
# set version for s6 overlay
ARG S6_OVERLAY_VERSION="3.1.0.1"
ARG S6_OVERLAY_ARCH="armhf"
# add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-${S6_OVERLAY_ARCH}.tar.xz
# add s6 optional symlinks
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-noarch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-noarch.tar.xz
ADD https://github.com/just-containers/s6-overlay/releases/download/v${S6_OVERLAY_VERSION}/s6-overlay-symlinks-arch.tar.xz /tmp
RUN tar -C /root-out -Jxpf /tmp/s6-overlay-symlinks-arch.tar.xz
# copy ci-checks
COPY ci-check/ /root-out/package/admin/s6-overlay-${S6_OVERLAY_VERSION}/etc/s6-rc/sources/top/contents.d
# patch cont-init for docker-mods
COPY patch/ /tmp/patch
RUN patch -u /root-out/package/admin/s6-overlay-${S6_OVERLAY_VERSION}/etc/s6-linux-init/skel/rc.init -i /tmp/patch/package/admin/s6-overlay-@VERSION@/etc/s6-linux-init/skel/rc.init.patch
# Runtime stage
FROM scratch
COPY --from=rootfs-stage /root-out/ /
@ -29,15 +55,6 @@ ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="TheLamer"
# set version for s6 overlay
ARG OVERLAY_VERSION="v2.2.0.3"
ARG OVERLAY_ARCH="arm"
# add s6 overlay
ADD https://github.com/just-containers/s6-overlay/releases/download/${OVERLAY_VERSION}/s6-overlay-${OVERLAY_ARCH}-installer /tmp/
RUN chmod +x /tmp/s6-overlay-${OVERLAY_ARCH}-installer && /tmp/s6-overlay-${OVERLAY_ARCH}-installer / && rm /tmp/s6-overlay-${OVERLAY_ARCH}-installer
COPY patch/ /tmp/patch
# set environment variables
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/root" \
@ -90,7 +107,6 @@ RUN \
apt-get install -y \
curl \
gnupg \
patch \
tzdata && \
echo "**** generate locale ****" && \
locale-gen en_US.UTF-8 && \
@ -101,21 +117,19 @@ RUN \
/app \
/config \
/defaults && \
mv /usr/bin/with-contenv /usr/bin/with-contenvb && \
patch -u /etc/s6/init/init-stage2 -i /tmp/patch/etc/s6/init/init-stage2.patch && \
echo "**** add qemu ****" && \
curl -o \
/usr/bin/qemu-arm-static -L \
"https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static" && \
chmod +x /usr/bin/qemu-arm-static && \
echo "**** cleanup ****" && \
apt-get remove -y patch && \
apt-get autoremove && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
/var/tmp/* \
/var/log/*
# add local files
COPY root/ /

Wyświetl plik

Wyświetl plik

@ -1,15 +0,0 @@
--- init-stage2 2021-01-20 20:21:41.628300700 -0600
+++ init-stage2_new 2021-01-20 20:23:48.123677700 -0600
@@ -17,6 +17,12 @@
backtick -D 0 -n S6_READ_ONLY_ROOT { printcontenv S6_READ_ONLY_ROOT }
importas -u S6_READ_ONLY_ROOT S6_READ_ONLY_ROOT
+# Docker Mods run logic
+foreground
+{
+ /docker-mods
+}
+
foreground
{
if

Wyświetl plik

@ -0,0 +1,11 @@
--- rc.init 2022-05-20 17:41:11.195721000 -0500
+++ rc.init.patched 2022-05-20 17:41:37.646586700 -0500
@@ -6,6 +6,8 @@
s6-chmod 0755 /run/s6/container_environment
fi
+/docker-mods
+
if profile=`printcontenv S6_RUNTIME_PROFILE` ; then
etc="/etc/cont-profile.d/$profile"
else

Wyświetl plik

@ -1,5 +1,14 @@
#!/usr/bin/with-contenv bash
# Set executable bit on cont-init and services built into the image
set_legacy_executable_bits() {
mkdir -p /etc/{cont-init.d,services.d}
chmod +x \
/etc/cont-init.d/* \
/etc/services.d/*/* 2> /dev/null || true
}
set_legacy_executable_bits
# Exit if mods is not set
if [ -z ${DOCKER_MODS+x} ]; then
exit 0
@ -119,3 +128,6 @@ for DOCKER_MOD in "${DOCKER_MODS[@]}"; do
echo ${SHALAYER} > "/${FILENAME}"
fi
done
# Set executable bit on cont-init and services that may have been unpacked by mods
set_legacy_executable_bits

0
root/etc/cont-init.d/01-envfile 100644 → 100755
Wyświetl plik

Wyświetl plik

0
root/etc/cont-init.d/10-adduser 100644 → 100755
Wyświetl plik

Wyświetl plik

Wyświetl plik

Wyświetl plik

@ -0,0 +1 @@
oneshot

Wyświetl plik

@ -0,0 +1 @@
ln -s /run/s6/legacy-services /run/s6/services

Wyświetl plik

@ -0,0 +1 @@
oneshot

Wyświetl plik

@ -0,0 +1 @@
echo "[ls.io-init] done."

Wyświetl plik

@ -1,7 +1,7 @@
#! /bin/bash
if [[ -f /var/run/s6/container_environment/UMASK ]] && [[ "$(pwdx $$)" =~ "/run/s6/services/" ]]; then
umask $(cat /var/run/s6/container_environment/UMASK)
exec /usr/bin/with-contenvb "$@"
exec /command/with-contenv "$@"
else
exec /usr/bin/with-contenvb "$@"
exec /command/with-contenv "$@"
fi