rebase main to jammy and s6v3, fix chown

This commit is contained in:
aptalca 2022-09-29 11:33:25 -04:00
parent dea3ec6292
commit dfa3c9506e
16 changed files with 34 additions and 35 deletions

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
# set version label
ARG BUILD_DATE
@ -8,16 +8,18 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"
RUN \
echo "**** install runtime dependencies ****" && \
apt-get update && \
apt-get install -y \
apt-get install -y --no-install-recommends \
git \
jq \
libatomic1 \
nano \
netcat \
net-tools \
sudo && \
echo "**** install openvscode-server ****" && \

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
# set version label
ARG BUILD_DATE
@ -8,16 +8,18 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"
RUN \
echo "**** install runtime dependencies ****" && \
apt-get update && \
apt-get install -y \
apt-get install -y --no-install-recommends \
git \
jq \
libatomic1 \
nano \
netcat \
net-tools \
sudo && \
echo "**** install openvscode-server ****" && \

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy
# set version label
ARG BUILD_DATE
@ -8,16 +8,18 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"
# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"
RUN \
echo "**** install runtime dependencies ****" && \
apt-get update && \
apt-get install -y \
apt-get install -y --no-install-recommends \
git \
jq \
libatomic1 \
nano \
netcat \
net-tools \
sudo && \
echo "**** install openvscode-server ****" && \

View File

@ -252,6 +252,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **29.09.22:** - Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents.
* **12.02.22:** - Update `install-extension` helper to compensate for upstream changes.
* **04.02.22:** - Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset. Add libsecret for keytar.
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.

View File

@ -61,6 +61,7 @@ app_setup_block: |
# changelog
changelogs:
- { date: "29.09.22:", desc: "Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents." }
- { date: "12.02.22:", desc: "Update `install-extension` helper to compensate for upstream changes." }
- { date: "04.02.22:", desc: "Update binary for 1.64.0+. Allow for no token set when both toekn env vars are unset. Add libsecret for keytar." }
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }

View File

@ -22,26 +22,14 @@ fi
[[ ! -f /config/.profile ]] && \
cp /root/.profile /config/.profile
# permissions
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
CORES=$(nproc --all)
# fix permissions (ignore contents of /config/workspace)
echo "setting permissions::config"
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
chown abc:abc /config/workspace
echo "setting permissions::app"
chown -R abc:abc /app/openvscode-server
# Split workload between config and workspace
echo "setting permissions::configuration"
find /config -path /config/workspace -prune -false -o -type d -print0 | \
xargs --null -r --max-args=1 --max-procs=$((CORES*2*8)) \
chown -R abc:abc
echo "setting permissions::workspace"
chown abc:abc /config/workspace
echo "setting permissions::app"
chown -R abc:abc /app/openvscode-server
else
# Set permissions on data mount
# do not decend into the workspace
chown -R abc:abc "$(ls /config -I workspace)"
chown abc:abc /config/workspace
chown -R abc:abc /app/openvscode-server
fi
chmod 700 /config/.ssh
chmod 600 /config/.ssh/*
if [ -n "$(ls -A /config/.ssh)" ]; then
chmod 600 /config/.ssh/*
fi

View File

@ -0,0 +1 @@
oneshot

View File

@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-openvscode-server/run

View File

@ -11,12 +11,11 @@ else
echo "**** No connection token is set ****"
fi
cd /app/openvscode-server || exit
exec \
s6-setuidgid abc \
/app/openvscode-server/bin/openvscode-server \
--host 0.0.0.0 \
--port 3000 \
--disable-telemetry \
${CODE_ARGS}
s6-notifyoncheck -d -n 7 -w 1000 -c "nc -z 127.0.0.1 3000" \
cd /app/openvscode-server s6-setuidgid abc \
/app/openvscode-server/bin/openvscode-server \
--host 0.0.0.0 \
--port 3000 \
--disable-telemetry \
${CODE_ARGS}

View File

@ -0,0 +1 @@
longrun