Compare commits
109 commits
master
...
edge-e2e45
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
111395d6c2 | ||
|
|
6928d962a9 | ||
|
|
8feeb1c663 | ||
|
|
bd923f0c07 | ||
|
|
5de9de0ac7 | ||
|
|
b65548c428 | ||
|
|
72f1baf69d | ||
|
|
5d2a37b122 | ||
|
|
52378c9c09 | ||
|
|
f58926b68c | ||
|
|
124f57dac9 | ||
|
|
b8b59937b5 | ||
|
|
0122712ce7 | ||
|
|
533d182af5 | ||
|
|
ced4151423 | ||
|
|
fa1f6346b3 | ||
|
|
bfa368d72a | ||
|
|
8777ae5846 | ||
|
|
2fd631bcab | ||
|
|
a8d588a1ab | ||
|
|
8578bfaae9 | ||
|
|
a7a7279625 | ||
|
|
68bbac5106 | ||
|
|
2ff83b7d5e | ||
|
|
890ccb111e | ||
|
|
083ad3333e | ||
|
|
b21fa71c22 | ||
|
|
019aa0a3d1 | ||
|
|
54f6d84100 | ||
|
|
e109ae692e | ||
|
|
0a22896061 | ||
|
|
c21860dab0 | ||
|
|
ce139478ca | ||
|
|
eab3b6ba11 | ||
|
|
cab3eeadd4 | ||
|
|
9b539b59ab | ||
|
|
f121ec8620 | ||
|
|
02a44ac5cc | ||
|
|
f49f2a7ff7 | ||
|
|
a97c9e1e38 | ||
|
|
84b75be898 | ||
|
|
4e105eaa63 | ||
|
|
a69767921d | ||
|
|
6053d93709 | ||
|
|
1daac311c0 | ||
|
|
30bfc83a2f | ||
|
|
7570b86c3b | ||
|
|
b0b95aaf4a | ||
|
|
c344d785c5 | ||
|
|
c5a4ced80b | ||
|
|
ed49acfed9 | ||
|
|
84040bc356 | ||
|
|
fe4b20c671 | ||
|
|
29137ee134 | ||
|
|
2ebffb0738 | ||
|
|
0d0b87bb49 | ||
|
|
62ae36fb72 | ||
|
|
04211457f4 | ||
|
|
4d37e5c5c3 | ||
|
|
5d3b1775c9 | ||
|
|
eff3e3eedc | ||
|
|
49dd15767a | ||
|
|
e76811827f | ||
|
|
590130ad99 | ||
|
|
1b550ca3f9 | ||
|
|
2737e61942 | ||
|
|
18c31c9b0c | ||
|
|
d99cb187ee | ||
|
|
b1212c2c63 | ||
|
|
6940c21a26 | ||
|
|
ae04d9f853 | ||
|
|
303d9e527a | ||
|
|
180013c3ff | ||
|
|
8306959bdf | ||
|
|
a920f18aad | ||
|
|
d8263b9b59 | ||
|
|
fd841ad988 | ||
|
|
4020c0ea29 | ||
|
|
71347b20aa | ||
|
|
734ee147d6 | ||
|
|
bd048d2dab | ||
|
|
aeedb5a69c | ||
|
|
6d04250a39 | ||
|
|
7bc173af84 | ||
|
|
1b555292e6 | ||
|
|
1e7c0ef688 | ||
|
|
04de9a73ff | ||
|
|
badd6b7ed5 | ||
|
|
3e715f2556 | ||
|
|
c09dc7bb58 | ||
|
|
bcd66ca9d5 | ||
|
|
9932e2d924 | ||
|
|
2bfe2a86ac | ||
|
|
ad1368e6ba | ||
|
|
e7b17bad12 | ||
|
|
e3e9c396a1 | ||
|
|
74609f330b | ||
|
|
9c1b874f34 | ||
|
|
fb54e102f6 | ||
|
|
acc7f819bd | ||
|
|
511d84e574 | ||
|
|
b2fbba6342 | ||
|
|
070dab87cb | ||
|
|
e90b30c8b4 | ||
|
|
c9237aaa39 | ||
|
|
b1377c0b7c | ||
|
|
9809b45ad3 | ||
|
|
8703692f9b | ||
|
|
6db4cd0ec3 |
4
.github/CONTRIBUTING.md
vendored
4
.github/CONTRIBUTING.md
vendored
|
|
@ -24,7 +24,7 @@
|
|||
## Readme
|
||||
|
||||
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine/edit/master/readme-vars.yml).
|
||||
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine/edit/edge/readme-vars.yml).
|
||||
|
||||
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
|
||||
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
|
||||
|
|
@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
|
|||
|
||||
## Update the changelog
|
||||
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine/tree/master/root), add an entry to the changelog
|
||||
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine/tree/edge/root), add an entry to the changelog
|
||||
|
||||
```yml
|
||||
changelogs:
|
||||
|
|
|
|||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
|
|
@ -21,7 +21,7 @@
|
|||
|
||||
------------------------------
|
||||
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine/blob/edge/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
|
||||
|
||||
------------------------------
|
||||
|
||||
|
|
|
|||
4
.github/workflows/external_trigger.yml
vendored
4
.github/workflows/external_trigger.yml
vendored
|
|
@ -4,13 +4,13 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
external-trigger-master:
|
||||
external-trigger-edge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: External Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/edge'
|
||||
run: |
|
||||
echo "**** No external release, exiting ****"
|
||||
exit 0
|
||||
|
|
|
|||
4
.github/workflows/greetings.yml
vendored
4
.github/workflows/greetings.yml
vendored
|
|
@ -8,6 +8,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
with:
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
issue-message: 'Thanks for opening your first issue here! Be sure to follow the [bug](https://github.com/linuxserver/docker-baseimage-alpine/blob/edge/.github/ISSUE_TEMPLATE/issue.bug.md) or [feature](https://github.com/linuxserver/docker-baseimage-alpine/blob/edge/.github/ISSUE_TEMPLATE/issue.feature.md) issue templates!'
|
||||
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine/blob/edge/.github/PULL_REQUEST_TEMPLATE.md)!'
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
|
|||
14
.github/workflows/package_trigger.yml
vendored
14
.github/workflows/package_trigger.yml
vendored
|
|
@ -4,25 +4,25 @@ on:
|
|||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
package-trigger-master:
|
||||
package-trigger-edge:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.3
|
||||
|
||||
- name: Package Trigger
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/edge'
|
||||
run: |
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_MASTER }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_MASTER is set; skipping trigger. ****"
|
||||
if [ -n "${{ secrets.PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_EDGE }}" ]; then
|
||||
echo "**** Github secret PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_EDGE is set; skipping trigger. ****"
|
||||
exit 0
|
||||
fi
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
if [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/edge/lastBuild/api/json | jq -r '.building') == "true" ]; then
|
||||
echo "**** There already seems to be an active build on Jenkins; skipping package trigger ****"
|
||||
exit 0
|
||||
fi
|
||||
echo "**** Package trigger running off of master branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_MASTER\". ****"
|
||||
echo "**** Package trigger running off of edge branch. To disable, set a Github secret named \"PAUSE_PACKAGE_TRIGGER_BASEIMAGE_ALPINE_EDGE\". ****"
|
||||
response=$(curl -iX POST \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/master/buildWithParameters?PACKAGE_CHECK=true \
|
||||
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine/job/edge/buildWithParameters?PACKAGE_CHECK=true \
|
||||
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
|
||||
echo "**** Jenkins job queue url: ${response%$'\r'} ****"
|
||||
echo "**** Sleeping 10 seconds until job starts ****"
|
||||
|
|
|
|||
119
Dockerfile
119
Dockerfile
|
|
@ -1,7 +1,7 @@
|
|||
FROM alpine:3.14 as rootfs-stage
|
||||
FROM alpine:3.15 as rootfs-stage
|
||||
|
||||
# environment
|
||||
ENV REL=v3.15
|
||||
ENV REL=edge
|
||||
ENV ARCH=x86_64
|
||||
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
|
||||
ENV PACKAGES=alpine-baselayout,\
|
||||
|
|
@ -13,77 +13,86 @@ xz
|
|||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
xz
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
patch \
|
||||
tar \
|
||||
tzdata \
|
||||
xz
|
||||
|
||||
# fetch builder script from gliderlabs
|
||||
RUN \
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG S6_OVERLAY_VERSION="3.1.2.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
|
||||
|
||||
# Runtime stage
|
||||
FROM scratch
|
||||
COPY --from=rootfs-stage /root-out/ /
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG MODS_VERSION="v3"
|
||||
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
|
||||
ADD "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
HOME="/root" \
|
||||
TERM="xterm"
|
||||
TERM="xterm" \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \
|
||||
S6_VERBOSITY=1 \
|
||||
S6_STAGE2_HOOK=/docker-mods
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
curl \
|
||||
patch \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/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 ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
jq \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults && \
|
||||
chmod +x /docker-mods && \
|
||||
echo "**** cleanup ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
FROM alpine:3.14 as rootfs-stage
|
||||
FROM alpine:3.15 as rootfs-stage
|
||||
|
||||
# environment
|
||||
ENV REL=v3.15
|
||||
ENV REL=edge
|
||||
ENV ARCH=aarch64
|
||||
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
|
||||
ENV PACKAGES=alpine-baselayout,\
|
||||
|
|
@ -13,82 +13,91 @@ xz
|
|||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
xz
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
patch \
|
||||
tar \
|
||||
tzdata \
|
||||
xz
|
||||
|
||||
# fetch builder script from gliderlabs
|
||||
RUN \
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG S6_OVERLAY_VERSION="3.1.2.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
|
||||
|
||||
# Runtime stage
|
||||
FROM scratch
|
||||
COPY --from=rootfs-stage /root-out/ /
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG MODS_VERSION="v3"
|
||||
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
|
||||
ADD "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
HOME="/root" \
|
||||
TERM="xterm"
|
||||
TERM="xterm" \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \
|
||||
S6_VERBOSITY=1 \
|
||||
S6_STAGE2_HOOK=/docker-mods
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
curl \
|
||||
patch \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/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 ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
jq \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults && \
|
||||
chmod +x /docker-mods && \
|
||||
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 ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
|
|
|||
129
Dockerfile.armhf
129
Dockerfile.armhf
|
|
@ -1,7 +1,7 @@
|
|||
FROM alpine:3.14 as rootfs-stage
|
||||
FROM alpine:3.15 as rootfs-stage
|
||||
|
||||
# environment
|
||||
ENV REL=v3.15
|
||||
ENV REL=edge
|
||||
ENV ARCH=armv7
|
||||
ENV MIRROR=http://dl-cdn.alpinelinux.org/alpine
|
||||
ENV PACKAGES=alpine-baselayout,\
|
||||
|
|
@ -13,82 +13,91 @@ xz
|
|||
|
||||
# install packages
|
||||
RUN \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
tzdata \
|
||||
xz
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
curl \
|
||||
patch \
|
||||
tar \
|
||||
tzdata \
|
||||
xz
|
||||
|
||||
# fetch builder script from gliderlabs
|
||||
RUN \
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
curl -o \
|
||||
/mkimage-alpine.bash -L \
|
||||
https://raw.githubusercontent.com/gliderlabs/docker-alpine/master/builder/scripts/mkimage-alpine.bash && \
|
||||
chmod +x \
|
||||
/mkimage-alpine.bash && \
|
||||
./mkimage-alpine.bash && \
|
||||
mkdir /root-out && \
|
||||
tar xf \
|
||||
/rootfs.tar.xz -C \
|
||||
/root-out && \
|
||||
sed -i -e 's/^root::/root:!:/' /root-out/etc/shadow
|
||||
|
||||
# set version for s6 overlay
|
||||
ARG S6_OVERLAY_VERSION="3.1.2.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
|
||||
|
||||
# Runtime stage
|
||||
FROM scratch
|
||||
COPY --from=rootfs-stage /root-out/ /
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG MODS_VERSION="v3"
|
||||
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
|
||||
ADD "https://raw.githubusercontent.com/linuxserver/docker-mods/mod-scripts/docker-mods.${MODS_VERSION}" "/docker-mods"
|
||||
|
||||
# environment variables
|
||||
ENV PS1="$(whoami)@$(hostname):$(pwd)\\$ " \
|
||||
HOME="/root" \
|
||||
TERM="xterm"
|
||||
TERM="xterm" \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME="0" \
|
||||
S6_VERBOSITY=1 \
|
||||
S6_STAGE2_HOOK=/docker-mods
|
||||
|
||||
RUN \
|
||||
echo "**** install build packages ****" && \
|
||||
apk add --no-cache --virtual=build-dependencies \
|
||||
curl \
|
||||
patch \
|
||||
tar && \
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/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 ****" && \
|
||||
apk del --purge \
|
||||
build-dependencies && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
echo "**** install runtime packages ****" && \
|
||||
apk add --no-cache \
|
||||
bash \
|
||||
ca-certificates \
|
||||
coreutils \
|
||||
curl \
|
||||
jq \
|
||||
procps \
|
||||
shadow \
|
||||
tzdata && \
|
||||
echo "**** create abc user and make our folders ****" && \
|
||||
groupmod -g 1000 users && \
|
||||
useradd -u 911 -U -d /config -s /bin/false abc && \
|
||||
usermod -G users abc && \
|
||||
mkdir -p \
|
||||
/app \
|
||||
/config \
|
||||
/defaults && \
|
||||
chmod +x /docker-mods && \
|
||||
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 ****" && \
|
||||
rm -rf \
|
||||
/tmp/*
|
||||
|
||||
# add local files
|
||||
COPY root/ /
|
||||
|
|
|
|||
96
Jenkinsfile
vendored
96
Jenkinsfile
vendored
|
|
@ -42,7 +42,7 @@ pipeline {
|
|||
script{
|
||||
env.EXIT_STATUS = ''
|
||||
env.LS_RELEASE = sh(
|
||||
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':3.15 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
script: '''docker run --rm ghcr.io/linuxserver/alexeiled-skopeo sh -c 'skopeo inspect docker://docker.io/'${DOCKERHUB_IMAGE}':edge 2>/dev/null' | jq -r '.Labels.build_version' | awk '{print $3}' | grep '\\-ls' || : ''',
|
||||
returnStdout: true).trim()
|
||||
env.LS_RELEASE_NOTES = sh(
|
||||
script: '''cat readme-vars.yml | awk -F \\" '/date: "[0-9][0-9].[0-9][0-9].[0-9][0-9]:/ {print $4;exit;}' | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
|
||||
|
|
@ -142,10 +142,10 @@ pipeline {
|
|||
}
|
||||
}
|
||||
}
|
||||
// If this is a master build use live docker endpoints
|
||||
// If this is a edge build use live docker endpoints
|
||||
stage("Set ENV live build"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
|
|
@ -155,20 +155,20 @@ pipeline {
|
|||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-3.15-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-3.15-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-3.15-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.CI_TAGS = 'amd64-edge-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm32v7-edge-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-edge-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
} else {
|
||||
env.CI_TAGS = '3.15-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.CI_TAGS = 'edge-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.META_TAG = '3.15-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = '3.15-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'edge-' + env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
env.EXT_RELEASE_TAG = 'edge-version-' + env.EXT_RELEASE_CLEAN
|
||||
}
|
||||
}
|
||||
}
|
||||
// If this is a dev build use dev docker endpoints
|
||||
stage("Set ENV dev build"){
|
||||
when {
|
||||
not {branch "master"}
|
||||
not {branch "edge"}
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
}
|
||||
steps {
|
||||
|
|
@ -178,13 +178,13 @@ pipeline {
|
|||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lsiodev-' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lsiodev-' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.CI_TAGS = 'amd64-edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v7-edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
} else {
|
||||
env.CI_TAGS = '3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.CI_TAGS = 'edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.META_TAG = '3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = '3.15-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
|
||||
env.EXT_RELEASE_TAG = 'edge-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
|
||||
}
|
||||
}
|
||||
|
|
@ -201,13 +201,13 @@ pipeline {
|
|||
env.GITLABIMAGE = 'registry.gitlab.com/linuxserver.io/' + env.LS_REPO + '/lspipepr-' + env.CONTAINER_NAME
|
||||
env.QUAYIMAGE = 'quay.io/linuxserver.io/lspipepr-' + env.CONTAINER_NAME
|
||||
if (env.MULTIARCH == 'true') {
|
||||
env.CI_TAGS = 'amd64-3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.CI_TAGS = 'amd64-edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v7-edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
} else {
|
||||
env.CI_TAGS = '3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.CI_TAGS = 'edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
}
|
||||
env.VERSION_TAG = env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.META_TAG = '3.15-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.EXT_RELEASE_TAG = '3.15-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.META_TAG = 'edge-' + env.EXT_RELEASE_CLEAN + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
|
||||
env.EXT_RELEASE_TAG = 'edge-version-' + env.EXT_RELEASE_CLEAN
|
||||
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
|
||||
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
|
||||
}
|
||||
|
|
@ -245,7 +245,7 @@ pipeline {
|
|||
// Use helper containers to render templated files
|
||||
stage('Update-Templates') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
expression {
|
||||
env.CONTAINER_NAME != null
|
||||
|
|
@ -256,13 +256,13 @@ pipeline {
|
|||
set -e
|
||||
TEMPDIR=$(mktemp -d)
|
||||
docker pull ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=master -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -e GITHUB_BRANCH=edge -v ${TEMPDIR}:/ansible/jenkins ghcr.io/linuxserver/jenkins-builder:latest
|
||||
# Stage 1 - Jenkinsfile update
|
||||
if [[ "$(md5sum Jenkinsfile | awk '{ print $1 }')" != "$(md5sum ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile | awk '{ print $1 }')" ]]; then
|
||||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f edge
|
||||
cp ${TEMPDIR}/docker-${CONTAINER_NAME}/Jenkinsfile ${TEMPDIR}/repo/${LS_REPO}/
|
||||
git add Jenkinsfile
|
||||
git commit -m 'Bot Updating Templated Files'
|
||||
|
|
@ -285,7 +285,7 @@ pipeline {
|
|||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f edge
|
||||
for i in ${TEMPLATES_TO_DELETE}; do
|
||||
git rm "${i}"
|
||||
done
|
||||
|
|
@ -306,7 +306,7 @@ pipeline {
|
|||
mkdir -p ${TEMPDIR}/repo
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/repo/${LS_REPO}
|
||||
cd ${TEMPDIR}/repo/${LS_REPO}
|
||||
git checkout -f master
|
||||
git checkout -f edge
|
||||
cd ${TEMPDIR}/docker-${CONTAINER_NAME}
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/workflows
|
||||
mkdir -p ${TEMPDIR}/repo/${LS_REPO}/.github/ISSUE_TEMPLATE
|
||||
|
|
@ -343,7 +343,7 @@ pipeline {
|
|||
// Exit the build if the Templated files were just updated
|
||||
stage('Template-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'FILES_UPDATED', value: 'true'
|
||||
expression {
|
||||
|
|
@ -382,7 +382,7 @@ pipeline {
|
|||
// Add package to Scarf.sh and set permissions
|
||||
stage("Scarf.sh package registry"){
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
steps{
|
||||
|
|
@ -539,7 +539,7 @@ pipeline {
|
|||
// Take the image we just built and dump package versions for comparison
|
||||
stage('Update-packages') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
}
|
||||
|
|
@ -576,7 +576,7 @@ pipeline {
|
|||
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
|
||||
if [ "${NEW_PACKAGE_TAG}" != "${PACKAGE_TAG}" ]; then
|
||||
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f master
|
||||
git --git-dir ${TEMPDIR}/${LS_REPO}/.git checkout -f edge
|
||||
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
|
||||
cd ${TEMPDIR}/${LS_REPO}/
|
||||
wait
|
||||
|
|
@ -600,7 +600,7 @@ pipeline {
|
|||
// Exit the build if the package file was just updated
|
||||
stage('PACKAGE-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'true'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
|
|
@ -614,7 +614,7 @@ pipeline {
|
|||
// Exit the build if this is just a package check and there are no changes to push
|
||||
stage('PACKAGECHECK-exit') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
environment name: 'CHANGE_ID', value: ''
|
||||
environment name: 'PACKAGE_UPDATED', value: 'false'
|
||||
environment name: 'EXIT_STATUS', value: ''
|
||||
|
|
@ -673,7 +673,7 @@ pipeline {
|
|||
-e DO_REGION="ams3" \
|
||||
-e DO_BUCKET="lsio-ci" \
|
||||
-t ghcr.io/linuxserver/ci:latest \
|
||||
python /ci/ci.py'''
|
||||
python3 test_build.py'''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -710,12 +710,12 @@ pipeline {
|
|||
echo $QUAYPASS | docker login quay.io -u $QUAYUSER --password-stdin
|
||||
for PUSHIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||
docker tag ${IMAGE}:${META_TAG} ${PUSHIMAGE}:${META_TAG}
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:3.15
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:edge
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker tag ${PUSHIMAGE}:${META_TAG} ${PUSHIMAGE}:${SEMVER}
|
||||
fi
|
||||
docker push ${PUSHIMAGE}:3.15
|
||||
docker push ${PUSHIMAGE}:edge
|
||||
docker push ${PUSHIMAGE}:${META_TAG}
|
||||
docker push ${PUSHIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
|
|
@ -729,7 +729,7 @@ pipeline {
|
|||
docker rmi \
|
||||
${DELETEIMAGE}:${META_TAG} \
|
||||
${DELETEIMAGE}:${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:3.15 || :
|
||||
${DELETEIMAGE}:edge || :
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker rmi ${DELETEIMAGE}:${SEMVER} || :
|
||||
fi
|
||||
|
|
@ -776,9 +776,9 @@ pipeline {
|
|||
docker tag ${IMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker tag ${IMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker tag ${IMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-3.15
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-3.15
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-3.15
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-edge
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-edge
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-edge
|
||||
docker tag ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||
docker tag ${MANIFESTIMAGE}:arm64v8-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
|
|
@ -790,9 +790,9 @@ pipeline {
|
|||
docker push ${MANIFESTIMAGE}:amd64-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker push ${MANIFESTIMAGE}:amd64-3.15
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-3.15
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-3.15
|
||||
docker push ${MANIFESTIMAGE}:amd64-edge
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-edge
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-edge
|
||||
docker push ${MANIFESTIMAGE}:amd64-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm32v7-${EXT_RELEASE_TAG}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${EXT_RELEASE_TAG}
|
||||
|
|
@ -801,10 +801,10 @@ pipeline {
|
|||
docker push ${MANIFESTIMAGE}:arm32v7-${SEMVER}
|
||||
docker push ${MANIFESTIMAGE}:arm64v8-${SEMVER}
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:3.15 || :
|
||||
docker manifest create ${MANIFESTIMAGE}:3.15 ${MANIFESTIMAGE}:amd64-3.15 ${MANIFESTIMAGE}:arm32v7-3.15 ${MANIFESTIMAGE}:arm64v8-3.15
|
||||
docker manifest annotate ${MANIFESTIMAGE}:3.15 ${MANIFESTIMAGE}:arm32v7-3.15 --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:3.15 ${MANIFESTIMAGE}:arm64v8-3.15 --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:edge || :
|
||||
docker manifest create ${MANIFESTIMAGE}:edge ${MANIFESTIMAGE}:amd64-edge ${MANIFESTIMAGE}:arm32v7-edge ${MANIFESTIMAGE}:arm64v8-edge
|
||||
docker manifest annotate ${MANIFESTIMAGE}:edge ${MANIFESTIMAGE}:arm32v7-edge --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:edge ${MANIFESTIMAGE}:arm64v8-edge --os linux --arch arm64 --variant v8
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG} || :
|
||||
docker manifest create ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:amd64-${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} ${MANIFESTIMAGE}:arm64v8-${META_TAG}
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${META_TAG} ${MANIFESTIMAGE}:arm32v7-${META_TAG} --os linux --arch arm
|
||||
|
|
@ -819,7 +819,7 @@ pipeline {
|
|||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm32v7-${SEMVER} --os linux --arch arm
|
||||
docker manifest annotate ${MANIFESTIMAGE}:${SEMVER} ${MANIFESTIMAGE}:arm64v8-${SEMVER} --os linux --arch arm64 --variant v8
|
||||
fi
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:3.15
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:edge
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${META_TAG}
|
||||
docker manifest push --purge ${MANIFESTIMAGE}:${EXT_RELEASE_TAG}
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
|
|
@ -832,10 +832,10 @@ pipeline {
|
|||
for DELETEIMAGE in "${GITHUBIMAGE}" "${GITLABIMAGE}" "${QUAYIMAGE}" "${IMAGE}"; do
|
||||
docker rmi \
|
||||
${DELETEIMAGE}:arm32v7-${META_TAG} \
|
||||
${DELETEIMAGE}:arm32v7-3.15 \
|
||||
${DELETEIMAGE}:arm32v7-edge \
|
||||
${DELETEIMAGE}:arm32v7-${EXT_RELEASE_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-${META_TAG} \
|
||||
${DELETEIMAGE}:arm64v8-3.15 \
|
||||
${DELETEIMAGE}:arm64v8-edge \
|
||||
${DELETEIMAGE}:arm64v8-${EXT_RELEASE_TAG} || :
|
||||
if [ -n "${SEMVER}" ]; then
|
||||
docker rmi \
|
||||
|
|
@ -853,7 +853,7 @@ pipeline {
|
|||
// If this is a public release tag it in the LS Github
|
||||
stage('Github-Tag-Push-Release') {
|
||||
when {
|
||||
branch "master"
|
||||
branch "edge"
|
||||
expression {
|
||||
env.LS_RELEASE != env.EXT_RELEASE_CLEAN + '-ls' + env.LS_TAG_NUMBER
|
||||
}
|
||||
|
|
@ -865,17 +865,17 @@ pipeline {
|
|||
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
|
||||
-d '{"tag":"'${META_TAG}'",\
|
||||
"object": "'${COMMIT_SHA}'",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to master",\
|
||||
"message": "Tagging Release '${EXT_RELEASE_CLEAN}'-ls'${LS_TAG_NUMBER}' to edge",\
|
||||
"type": "commit",\
|
||||
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
|
||||
echo "Pushing New release for Tag"
|
||||
sh '''#! /bin/bash
|
||||
echo "Updating base packages to ${PACKAGE_TAG}" > releasebody.json
|
||||
echo '{"tag_name":"'${META_TAG}'",\
|
||||
"target_commitish": "master",\
|
||||
"target_commitish": "edge",\
|
||||
"name": "'${META_TAG}'",\
|
||||
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**OS Changes:**\\n\\n' > start
|
||||
printf '","draft": false,"prerelease": false}' >> releasebody.json
|
||||
printf '","draft": false,"prerelease": true}' >> releasebody.json
|
||||
paste -d'\\0' start releasebody.json > releasebody.json.done
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<!-- DO NOT EDIT THIS FILE MANUALLY -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-baseimage-alpine/blob/master/.github/CONTRIBUTING.md -->
|
||||
<!-- Please read the https://github.com/linuxserver/docker-baseimage-alpine/blob/edge/.github/CONTRIBUTING.md -->
|
||||
|
||||
[linuxserverurl]: https://linuxserver.io
|
||||
[forumurl]: https://forum.linuxserver.io
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
# jenkins variables
|
||||
project_name: docker-baseimage-alpine
|
||||
external_type: os
|
||||
release_type: stable
|
||||
release_tag: "3.15"
|
||||
ls_branch: master
|
||||
release_type: prerelease
|
||||
release_tag: edge
|
||||
ls_branch: edge
|
||||
repo_vars:
|
||||
- BUILD_VERSION_ARG = 'OS'
|
||||
- LS_USER = 'linuxserver'
|
||||
|
|
|
|||
|
|
@ -1,33 +1,39 @@
|
|||
alpine-baselayout-3.2.0-r18
|
||||
alpine-baselayout-3.4.0-r0
|
||||
alpine-baselayout-data-3.4.0-r0
|
||||
alpine-keys-2.4-r1
|
||||
apk-tools-2.12.7-r3
|
||||
bash-5.1.16-r0
|
||||
busybox-1.34.1-r4
|
||||
ca-certificates-20211220-r0
|
||||
ca-certificates-bundle-20211220-r0
|
||||
coreutils-9.0-r2
|
||||
libacl-2.2.53-r0
|
||||
apk-tools-2.12.10-r1
|
||||
bash-5.2.9-r0
|
||||
brotli-libs-1.0.9-r9
|
||||
busybox-1.35.0-r27
|
||||
busybox-binsh-1.35.0-r27
|
||||
ca-certificates-20220614-r2
|
||||
ca-certificates-bundle-20220614-r2
|
||||
coreutils-9.1-r0
|
||||
curl-7.86.0-r1
|
||||
jq-1.6-r2
|
||||
libacl-2.3.1-r1
|
||||
libattr-2.5.1-r1
|
||||
libc-utils-0.7.2-r3
|
||||
libcrypto1.1-1.1.1l-r8
|
||||
libintl-0.21-r0
|
||||
libproc-3.3.17-r0
|
||||
libretls-3.3.4-r2
|
||||
libssl1.1-1.1.1l-r8
|
||||
linux-pam-1.5.2-r0
|
||||
musl-1.2.2-r7
|
||||
musl-utils-1.2.2-r7
|
||||
ncurses-libs-6.3_p20211120-r0
|
||||
ncurses-terminfo-base-6.3_p20211120-r0
|
||||
procps-3.3.17-r0
|
||||
readline-8.1.1-r0
|
||||
s6-ipcserver-2.11.0.0-r0
|
||||
scanelf-1.3.3-r0
|
||||
shadow-4.8.1-r1
|
||||
skalibs-2.11.0.0-r0
|
||||
ssl_client-1.34.1-r4
|
||||
tzdata-2021e-r0
|
||||
utmps-0.1.0.3-r0
|
||||
xz-5.2.5-r0
|
||||
xz-libs-5.2.5-r0
|
||||
zlib-1.2.11-r3
|
||||
libcrypto3-3.0.7-r0
|
||||
libcurl-7.86.0-r1
|
||||
libintl-0.21.1-r1
|
||||
libproc-3.3.17-r2
|
||||
libssl3-3.0.7-r0
|
||||
linux-pam-1.5.2-r1
|
||||
musl-1.2.3-r4
|
||||
musl-utils-1.2.3-r4
|
||||
ncurses-libs-6.3_p20221112-r0
|
||||
ncurses-terminfo-base-6.3_p20221112-r0
|
||||
nghttp2-libs-1.51.0-r0
|
||||
oniguruma-6.9.8-r0
|
||||
procps-3.3.17-r2
|
||||
readline-8.2.0-r0
|
||||
scanelf-1.3.5-r1
|
||||
shadow-4.13-r0
|
||||
skalibs-2.12.0.1-r0
|
||||
ssl_client-1.35.0-r27
|
||||
tzdata-2022f-r1
|
||||
utmps-libs-0.1.2.0-r1
|
||||
xz-5.2.8-r0
|
||||
xz-libs-5.2.8-r0
|
||||
zlib-1.2.13-r0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
119
root/docker-mods
119
root/docker-mods
|
|
@ -1,119 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Exit if mods is not set
|
||||
if [ -z ${DOCKER_MODS+x} ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Check for curl
|
||||
if [ ! -f /usr/bin/curl ] || [ ! -f /usr/bin/jq ]; then
|
||||
echo "[mod-init] Curl/JQ was not found on this system for Docker mods installing"
|
||||
if [ -f /usr/bin/apt ]; then
|
||||
## Ubuntu
|
||||
apt-get update
|
||||
apt-get install --no-install-recommends -y \
|
||||
curl \
|
||||
jq
|
||||
elif [ -f /sbin/apk ]; then
|
||||
# Alpine
|
||||
apk add --no-cache \
|
||||
curl \
|
||||
jq
|
||||
fi
|
||||
fi
|
||||
|
||||
## Functions
|
||||
|
||||
# Use different filtering depending on URL
|
||||
get_blob_sha () {
|
||||
if [[ $1 == "ghcr" ]]; then
|
||||
curl \
|
||||
--silent \
|
||||
--location \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer $2" \
|
||||
$3 | jq -r '.layers[0].digest'
|
||||
else
|
||||
curl \
|
||||
--silent \
|
||||
--location \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer $2" \
|
||||
$3 | jq -r '.fsLayers[0].blobSum'
|
||||
fi
|
||||
}
|
||||
|
||||
# Main run logic
|
||||
echo "[mod-init] Attempting to run Docker Modification Logic"
|
||||
IFS='|'
|
||||
DOCKER_MODS=(${DOCKER_MODS})
|
||||
for DOCKER_MOD in "${DOCKER_MODS[@]}"; do
|
||||
# Support alternative endpoints
|
||||
if [[ ${DOCKER_MOD} == ghcr.io/* ]] || [[ ${DOCKER_MOD} == linuxserver/* ]]; then
|
||||
DOCKER_MOD="${DOCKER_MOD#ghcr.io/*}"
|
||||
ENDPOINT="${DOCKER_MOD%%:*}"
|
||||
USERNAME="${DOCKER_MOD%%/*}"
|
||||
REPO="${ENDPOINT#*/}"
|
||||
TAG="${DOCKER_MOD#*:}"
|
||||
if [[ ${TAG} == "${DOCKER_MOD}" ]]; then
|
||||
TAG="latest"
|
||||
fi
|
||||
FILENAME="${USERNAME}.${REPO}.${TAG}"
|
||||
AUTH_URL="https://ghcr.io/token?scope=repository%3A${USERNAME}%2F${REPO}%3Apull"
|
||||
MANIFEST_URL="https://ghcr.io/v2/${ENDPOINT}/manifests/${TAG}"
|
||||
BLOB_URL="https://ghcr.io/v2/${ENDPOINT}/blobs/"
|
||||
MODE="ghcr"
|
||||
else
|
||||
ENDPOINT="${DOCKER_MOD%%:*}"
|
||||
USERNAME="${DOCKER_MOD%%/*}"
|
||||
REPO="${ENDPOINT#*/}"
|
||||
TAG="${DOCKER_MOD#*:}"
|
||||
if [[ ${TAG} == "${DOCKER_MOD}" ]]; then
|
||||
TAG="latest"
|
||||
fi
|
||||
FILENAME="${USERNAME}.${REPO}.${TAG}"
|
||||
AUTH_URL="https://auth.docker.io/token?service=registry.docker.io&scope=repository:${ENDPOINT}:pull"
|
||||
MANIFEST_URL="https://registry-1.docker.io/v2/${ENDPOINT}/manifests/${TAG}"
|
||||
BLOB_URL="https://registry-1.docker.io/v2/${ENDPOINT}/blobs/"
|
||||
MODE="dockerhub"
|
||||
fi
|
||||
# Kill off modification logic if any of the usernames are banned
|
||||
BLACKLIST=$(curl -s https://raw.githubusercontent.com/linuxserver/docker-mods/master/blacklist.txt)
|
||||
IFS=$'\n'
|
||||
BLACKLIST=(${BLACKLIST})
|
||||
for BANNED in "${BLACKLIST[@]}"; do
|
||||
if [ "${BANNED}" == "${USERNAME,,}" ]; then
|
||||
if [ -z ${RUN_BANNED_MODS+x} ]; then
|
||||
echo "[mod-init] ${DOCKER_MOD} is banned from use due to reported abuse aborting mod logic"
|
||||
exit 0
|
||||
else
|
||||
echo "[mod-init] You have chosen to run banned mods ${DOCKER_MOD} will be applied"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
echo "[mod-init] Applying ${DOCKER_MOD} files to container"
|
||||
# Get Dockerhub token for api operations
|
||||
TOKEN=\
|
||||
"$(curl \
|
||||
--silent \
|
||||
--header 'GET' \
|
||||
"${AUTH_URL}" \
|
||||
| jq -r '.token' \
|
||||
)"
|
||||
# Determine first and only layer of image
|
||||
SHALAYER=$(get_blob_sha "${MODE}" "${TOKEN}" "${MANIFEST_URL}")
|
||||
# Check if we have allready applied this layer
|
||||
if [ -f "/${FILENAME}" ] && [ "${SHALAYER}" == "$(cat /${FILENAME})" ]; then
|
||||
echo "[mod-init] ${DOCKER_MOD} at ${SHALAYER} has been previously applied skipping"
|
||||
else
|
||||
# Download and extract layer to /
|
||||
curl \
|
||||
--silent \
|
||||
--location \
|
||||
--request GET \
|
||||
--header "Authorization: Bearer ${TOKEN}" \
|
||||
"${BLOB_URL}${SHALAYER}" \
|
||||
| tar xz -C /
|
||||
echo ${SHALAYER} > "/${FILENAME}"
|
||||
fi
|
||||
done
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#! /bin/bash
|
||||
|
||||
if [[ "$(ls /var/run/s6/container_environment/ | xargs)" == *"FILE__"* ]]; then
|
||||
for FILENAME in /var/run/s6/container_environment/*; do
|
||||
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
|
||||
SECRETFILE=$(cat ${FILENAME})
|
||||
if [[ -f ${SECRETFILE} ]]; then
|
||||
FILESTRIP=${FILENAME//FILE__/}
|
||||
cat ${SECRETFILE} > ${FILESTRIP}
|
||||
echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
|
||||
else
|
||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
MIGRATIONS_DIR="/migrations"
|
||||
MIGRATIONS_HISTORY="/config/.migrations"
|
||||
|
||||
echo "[migrations] started"
|
||||
|
||||
if [ ! -d $MIGRATIONS_DIR ]; then
|
||||
echo "[migrations] no migrations found"
|
||||
exit
|
||||
fi
|
||||
|
||||
for MIGRATION in $(ls -1 ${MIGRATIONS_DIR}/* | sort -n); do
|
||||
NAME="$(basename "${MIGRATION}")"
|
||||
if [ -f $MIGRATIONS_HISTORY ] && grep -Fxq "$NAME" $MIGRATIONS_HISTORY; then
|
||||
echo "[migrations] ${NAME}: skipped"
|
||||
continue
|
||||
fi
|
||||
echo "[migrations] ${NAME}: executing..."
|
||||
chmod +x $MIGRATION
|
||||
EXIT_CODE=$(/bin/bash ${MIGRATION}; echo $?)
|
||||
if [ $EXIT_CODE -ne 0 ]; then
|
||||
echo "[migrations] ${NAME}: failed with exit code $EXIT_CODE, contact support"
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
echo $NAME >> $MIGRATIONS_HISTORY
|
||||
echo "[migrations] ${NAME}: succeeded"
|
||||
done
|
||||
|
||||
echo "[migrations] done"
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
if ([ -d "/config/custom-cont-init.d" ] && [ -n "$(find /config/custom-cont-init.d ! -user root)" ]) || ([ -d "/config/custom-services.d" ] && [ -n "$(find /config/custom-services.d ! -user root)" ]); then
|
||||
echo "**** Potential tampering with custom scripts/services detected ****"
|
||||
randstr=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-8};echo;)
|
||||
for folder in "/config/custom-cont-init.d" "/config/custom-services.d"; do
|
||||
if [ -d "${folder}" ]; then
|
||||
mv "${folder}" "${folder}.${randstr}"
|
||||
echo "**** Folder ${folder} is moved to ${folder}.${randstr} ****"
|
||||
fi
|
||||
done
|
||||
echo "**** The folders '/config/custom-cont-init.d' and '/config/custom-services.d'; and their contents need to all be owned by root to prevent root escalation inside the container!!! ****"
|
||||
mkdir -p /config/custom-cont-init.d /config/custom-services.d
|
||||
chown 0:0 /config/custom-cont-init.d /config/custom-services.d
|
||||
elif ([ -d "/config/custom-cont-init.d" ] && [ -n "$(find /config/custom-cont-init.d -perm -o+w)" ]) || ([ -d "/config/custom-services.d" ] && [ -n "$(find /config/custom-services.d -perm -o+w)" ]); then
|
||||
echo "**** The folders '/config/custom-cont-init.d' or '/config/custom-services.d'; or some of their contents have write permissions for others, which is a security risk. ****"
|
||||
echo "**** Please review the permissions of these two folders and their contents to make sure they are owned by root, and can only be modified by root. ****"
|
||||
fi
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# create custom folders and secure permissions
|
||||
mkdir -p /config/{custom-cont-init.d,custom-services.d}
|
||||
chown -R 0:0 /config/{custom-cont-init.d,custom-services.d}
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# Directories
|
||||
SCRIPTS_DIR="/config/custom-cont-init.d"
|
||||
SERVICES_DIR="/config/custom-services.d"
|
||||
|
||||
# Remove all existing custom services before continuing to ensure
|
||||
# we aren't running anything the user may have removed
|
||||
if [ -n "$(/bin/ls -A /etc/services.d/custom-service-* 2>/dev/null)" ]; then
|
||||
echo "[custom-init] removing existing custom services..."
|
||||
rm -rf /etc/services.d/custom-service-*
|
||||
fi
|
||||
|
||||
# Make sure custom init directory exists and has files in it
|
||||
if ([ -e "${SCRIPTS_DIR}" ] && \
|
||||
[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]) || \
|
||||
([ -e "${SERVICES_DIR}" ] && \
|
||||
[ -n "$(/bin/ls -A ${SERVICES_DIR} 2>/dev/null)" ]); then
|
||||
if [ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]; then
|
||||
echo "[custom-init] files found in ${SCRIPTS_DIR} executing"
|
||||
for SCRIPT in ${SCRIPTS_DIR}/*; do
|
||||
NAME="$(basename "${SCRIPT}")"
|
||||
if [ -f "${SCRIPT}" ]; then
|
||||
echo "[custom-init] ${NAME}: executing..."
|
||||
/bin/bash ${SCRIPT}
|
||||
echo "[custom-init] ${NAME}: exited $?"
|
||||
elif [ ! -f "${SCRIPT}" ]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
if [ -n "$(/bin/ls -A ${SERVICES_DIR} 2>/dev/null)" ]; then
|
||||
echo "[custom-init] service files found in ${SERVICES_DIR}"
|
||||
for SERVICE in ${SERVICES_DIR}/*; do
|
||||
NAME="$(basename "${SERVICE}")"
|
||||
if [ -f "${SERVICE}" ]; then
|
||||
echo "[custom-init] ${NAME}: service detected, copying..."
|
||||
mkdir -p /etc/services.d/custom-service-${NAME}/
|
||||
cp ${SERVICE} /etc/services.d/custom-service-${NAME}/run
|
||||
chmod +x /etc/services.d/custom-service-${NAME}/run
|
||||
echo "[custom-init] ${NAME}: copied"
|
||||
elif [ ! -f "${SERVICE}" ]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
else
|
||||
echo "[custom-init] no custom files found exiting..."
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/00-legacy/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/00-legacy/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/00-legacy/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/00-legacy/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
ln -s /run/s6/legacy-services /run/s6/services
|
||||
1
root/etc/s6-overlay/s6-rc.d/99-ci-service-check/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/99-ci-service-check/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/99-ci-service-check/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/99-ci-service-check/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
echo "[ls.io-init] done."
|
||||
5
root/etc/cont-init.d/10-adduser → root/etc/s6-overlay/s6-rc.d/init-adduser/run
Normal file → Executable file
5
root/etc/cont-init.d/10-adduser → root/etc/s6-overlay/s6-rc.d/init-adduser/run
Normal file → Executable file
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
PUID=${PUID:-911}
|
||||
PGID=${PGID:-911}
|
||||
|
|
@ -37,7 +38,7 @@ User gid: $(id -g abc)
|
|||
time32="$(date +%Y)"
|
||||
|
||||
if [[ "${time32}" == "1970" || "${time32}" == "1969" ]] && [ "$(uname -m)" == "armv7l" ]; then
|
||||
echo '
|
||||
echo '
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
|
||||
Your DockerHost is running an outdated version of libseccomp
|
||||
|
|
@ -48,7 +49,7 @@ Apps will not behave correctly without this
|
|||
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
'
|
||||
sleep infinity
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
chown abc:abc /app
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-adduser/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-adduser/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-adduser/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-adduser/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-adduser/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the downstream image init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-config/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-config/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the start of the downstream image init process
|
||||
56
root/etc/s6-overlay/s6-rc.d/init-custom-files/run
Executable file
56
root/etc/s6-overlay/s6-rc.d/init-custom-files/run
Executable file
|
|
@ -0,0 +1,56 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Directories
|
||||
SCRIPTS_DIR_OLD="/config/custom-cont-init.d"
|
||||
SCRIPTS_DIR="/custom-cont-init.d"
|
||||
|
||||
SERVICES_DIR_OLD="/config/custom-services.d"
|
||||
|
||||
# chown legacy folders if they exist
|
||||
if [[ -e "${SCRIPTS_DIR_OLD}" ]]; then
|
||||
chown -R 0:0 "${SCRIPTS_DIR_OLD}"
|
||||
fi
|
||||
|
||||
# chown legacy folders if they exist
|
||||
if [[ -e "${SERVICES_DIR_OLD}" ]]; then
|
||||
chown -R 0:0 "${SERVICES_DIR_OLD}"
|
||||
fi
|
||||
|
||||
# Make sure custom init directory exists and has files in it
|
||||
if [[ -e "${SCRIPTS_DIR}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR} 2>/dev/null)" ]]; then
|
||||
echo "[custom-init] Files found, executing"
|
||||
for SCRIPT in "${SCRIPTS_DIR}"/*; do
|
||||
NAME="$(basename "${SCRIPT}")"
|
||||
if [[ -f "${SCRIPT}" ]]; then
|
||||
echo "[custom-init] ${NAME}: executing..."
|
||||
/bin/bash "${SCRIPT}"
|
||||
echo "[custom-init] ${NAME}: exited $?"
|
||||
elif [[ ! -f "${SCRIPT}" ]]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
|
||||
# Remove legacy folder if it's empty
|
||||
if [[ -e "${SCRIPTS_DIR_OLD}" ]] && [[ -z "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]]; then
|
||||
echo "[custom-init] Legacy files folder ${SCRIPTS_DIR_OLD} is empty, deleting..."
|
||||
rm -rf "${SCRIPTS_DIR_OLD}"
|
||||
fi
|
||||
elif [[ -e "${SCRIPTS_DIR_OLD}" ]] && [[ -n "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]]; then
|
||||
echo "[custom-init] Files found, executing"
|
||||
for SCRIPT in "${SCRIPTS_DIR_OLD}"/*; do
|
||||
NAME="$(basename "${SCRIPT}")"
|
||||
if [[ -f "${SCRIPT}" ]]; then
|
||||
echo "[custom-init] ${NAME}: executing..."
|
||||
/bin/bash "${SCRIPT}"
|
||||
echo "[custom-init] ${NAME}: exited $?"
|
||||
elif [[ ! -f "${SCRIPT}" ]]; then
|
||||
echo "[custom-init] ${NAME}: is not a file"
|
||||
fi
|
||||
done
|
||||
elif [[ -e "${SCRIPTS_DIR_OLD}" ]] && [[ -z "$(/bin/ls -A ${SCRIPTS_DIR_OLD} 2>/dev/null)" ]]; then
|
||||
echo "[custom-init] Legacy files folder ${SCRIPTS_DIR_OLD} is empty, deleting..."
|
||||
rm -rf "${SCRIPTS_DIR_OLD}"
|
||||
else
|
||||
echo "[custom-init] No custom files found, skipping..."
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-custom-files/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-custom-files/run
|
||||
17
root/etc/s6-overlay/s6-rc.d/init-envfile/run
Executable file
17
root/etc/s6-overlay/s6-rc.d/init-envfile/run
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if find /run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; then
|
||||
for FILENAME in /run/s6/container_environment/*; do
|
||||
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
|
||||
SECRETFILE=$(cat "${FILENAME}")
|
||||
if [[ -f ${SECRETFILE} ]]; then
|
||||
FILESTRIP=${FILENAME//FILE__/}
|
||||
cat "${SECRETFILE}" >"${FILESTRIP}"
|
||||
echo "[env-init] ${FILESTRIP##*/} set from ${FILENAME##*/}"
|
||||
else
|
||||
echo "[env-init] cannot find secret in ${FILENAME##*/}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-envfile/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-envfile/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-envfile/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-envfile/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-envfile/run
|
||||
33
root/etc/s6-overlay/s6-rc.d/init-migrations/run
Executable file
33
root/etc/s6-overlay/s6-rc.d/init-migrations/run
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
MIGRATIONS_DIR="/migrations"
|
||||
MIGRATIONS_HISTORY="/config/.migrations"
|
||||
|
||||
echo "[migrations] started"
|
||||
|
||||
if [[ ! -d ${MIGRATIONS_DIR} ]]; then
|
||||
echo "[migrations] no migrations found"
|
||||
exit
|
||||
fi
|
||||
|
||||
for MIGRATION in $(find ${MIGRATIONS_DIR}/* | sort -n); do
|
||||
NAME="$(basename "${MIGRATION}")"
|
||||
if [[ -f ${MIGRATIONS_HISTORY} ]] && grep -Fxq "${NAME}" ${MIGRATIONS_HISTORY}; then
|
||||
echo "[migrations] ${NAME}: skipped"
|
||||
continue
|
||||
fi
|
||||
echo "[migrations] ${NAME}: executing..."
|
||||
chmod +x "${MIGRATION}"
|
||||
# Execute migration script in a subshell to prevent it from modifying the current environment
|
||||
("${MIGRATION}")
|
||||
EXIT_CODE=$?
|
||||
if [[ ${EXIT_CODE} -ne 0 ]]; then
|
||||
echo "[migrations] ${NAME}: failed with exit code ${EXIT_CODE}, contact support"
|
||||
exit "${EXIT_CODE}"
|
||||
fi
|
||||
echo "${NAME}" >>${MIGRATIONS_HISTORY}
|
||||
echo "[migrations] ${NAME}: succeeded"
|
||||
done
|
||||
|
||||
echo "[migrations] done"
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-migrations/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-migrations/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-migrations/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-migrations/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-migrations/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the mod init process
|
||||
44
root/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
Executable file
44
root/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ -f "/mod-repo-packages-to-install.list" ]]; then
|
||||
IFS=' ' read -ra REPO_PACKAGES <<< "$(tr '\n' ' ' < /mod-repo-packages-to-install.list)"
|
||||
if [[ ${#REPO_PACKAGES[@]} -ne 0 ]] && [[ ${REPO_PACKAGES[*]} != "" ]]; then
|
||||
echo "[mod-init] **** Installing all mod packages ****"
|
||||
if [[ -f /usr/bin/apt ]]; then
|
||||
export DEBIAN_FRONTEND="noninteractive"
|
||||
apt-get update
|
||||
apt-get install -y --no-install-recommends \
|
||||
"${REPO_PACKAGES[@]}"
|
||||
elif [[ -f /sbin/apk ]]; then
|
||||
apk add --no-cache \
|
||||
"${REPO_PACKAGES[@]}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -f "/mod-pip-packages-to-install.list" ]]; then
|
||||
IFS=' ' read -ra PIP_PACKAGES <<< "$(tr '\n' ' ' < /mod-pip-packages-to-install.list)"
|
||||
if [[ ${#PIP_PACKAGES[@]} -ne 0 ]] && [[ ${PIP_PACKAGES[*]} != "" ]]; then
|
||||
echo "[mod-init] **** Installing all pip packages ****"
|
||||
python3 -m pip install -U pip wheel setuptools
|
||||
PIP_ARGS=()
|
||||
if [[ -f /usr/bin/apt ]]; then
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/ubuntu/")
|
||||
elif [[ -f /sbin/apk ]]; then
|
||||
ALPINE_VER=$(grep main /etc/apk/repositories | sed 's|.*alpine/v||' | sed 's|/main.*||')
|
||||
if [[ "${ALPINE_VER}" = "3.14" ]]; then
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine/")
|
||||
else
|
||||
PIP_ARGS+=("-f" "https://wheel-index.linuxserver.io/alpine-${ALPINE_VER}/")
|
||||
fi
|
||||
fi
|
||||
python3 -m pip install \
|
||||
"${PIP_ARGS[@]}" \
|
||||
"${PIP_PACKAGES[@]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -rf \
|
||||
/mod-repo-packages-to-install.list \
|
||||
/mod-pip-packages-to-install.list
|
||||
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods-package-install/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods-package-install/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-mods-package-install/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-mods/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-mods/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the start of the mod init process
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-os-end/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-os-end/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-os-end/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-os-end/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it's just the end of the mod init process
|
||||
23
root/etc/s6-overlay/s6-rc.d/init-script-check/run
Executable file
23
root/etc/s6-overlay/s6-rc.d/init-script-check/run
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
if [[ -n "$(/bin/ls -A "/config/custom-cont-init.d" 2>/dev/null)" ]] ||
|
||||
[[ -n "$(/bin/ls -A "/config/custom-services.d" 2>/dev/null)" ]]; then
|
||||
cat << EOF | tee /config/custom-cont-init.d/README.txt 2>/dev/null
|
||||
********************************************************
|
||||
********************************************************
|
||||
* *
|
||||
* !!!! *
|
||||
* Custom scripts or services found in legacy locations *
|
||||
* !!!! *
|
||||
* Please move your custom scripts and services *
|
||||
* to /custom-cont-init.d and /custom-services.d *
|
||||
* respectively to ensure they continue working. *
|
||||
* *
|
||||
* Visit https://linuxserver.io/custom for more info. *
|
||||
* *
|
||||
********************************************************
|
||||
********************************************************
|
||||
EOF
|
||||
fi
|
||||
exit 0
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-script-check/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-script-check/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-script-check/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-script-check/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
/etc/s6-overlay/s6-rc.d/init-script-check/run
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-services/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-services/type
Normal file
|
|
@ -0,0 +1 @@
|
|||
oneshot
|
||||
1
root/etc/s6-overlay/s6-rc.d/init-services/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-services/up
Normal file
|
|
@ -0,0 +1 @@
|
|||
# This file doesn't do anything, it just signals that services can start
|
||||
|
|
@ -1,7 +1,9 @@
|
|||
#! /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 "$@"
|
||||
else
|
||||
exec /usr/bin/with-contenvb "$@"
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -f /run/s6/container_environment/UMASK ]] &&
|
||||
{ [[ "$(pwdx $$)" =~ "/run/s6/legacy-services/" ]] ||
|
||||
[[ "$(pwdx $$)" =~ "/run/s6/services/" ]] ||
|
||||
[[ "$(pwdx $$)" =~ "/servicedirs/svc-" ]]; }; then
|
||||
umask "$(cat /run/s6/container_environment/UMASK)"
|
||||
fi
|
||||
exec /command/with-contenv "$@"
|
||||
|
|
|
|||
Loading…
Reference in a new issue