Merge pull request #125 from linuxserver/jammy

rebase to jammy, switch to s6v3, fix chown
This commit is contained in:
aptalca 2022-10-01 13:40:31 -04:00 committed by GitHub
commit b55b470d99
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 60 additions and 121 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,25 +8,19 @@ 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 node repo ****" && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
> /etc/apt/sources.list.d/nodesource.list && \
echo "**** install build dependencies ****" && \
apt-get update && \
apt-get install -y \
build-essential \
nodejs && \
echo "**** install runtime dependencies ****" && \
apt-get install -y \
apt-get update && \
apt-get install -y --no-install-recommends \
git \
jq \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
@ -39,22 +33,13 @@ RUN \
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
tar xf /tmp/code-server.tar.gz -C \
/app/code-server --strip-components=1 && \
echo "**** patch 4.0.2 ****" && \
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
cd /app/code-server && \
npm i --production @node-rs/argon2; \
fi && \
echo "**** clean up ****" && \
apt-get purge --auto-remove -y \
build-essential \
nodejs && \
apt-get clean && \
rm -rf \
/config/* \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/etc/apt/sources.list.d/nodesource.list
/var/tmp/*
# add local files
COPY /root /

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,25 +8,19 @@ 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 node repo ****" && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
> /etc/apt/sources.list.d/nodesource.list && \
echo "**** install build dependencies ****" && \
apt-get update && \
apt-get install -y \
build-essential \
nodejs && \
echo "**** install runtime dependencies ****" && \
apt-get install -y \
apt-get update && \
apt-get install -y --no-install-recommends \
git \
jq \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
@ -39,22 +33,13 @@ RUN \
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-arm64.tar.gz" && \
tar xf /tmp/code-server.tar.gz -C \
/app/code-server --strip-components=1 && \
echo "**** patch 4.0.2 ****" && \
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
cd /app/code-server && \
npm i --production @node-rs/argon2; \
fi && \
echo "**** clean up ****" && \
apt-get purge --auto-remove -y \
build-essential \
nodejs && \
apt-get clean && \
rm -rf \
/config/* \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/etc/apt/sources.list.d/nodesource.list
/var/tmp/*
# add local files
COPY /root /

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,25 +8,19 @@ 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 node repo ****" && \
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
> /etc/apt/sources.list.d/nodesource.list && \
echo "**** install build dependencies ****" && \
apt-get update && \
apt-get install -y \
build-essential \
nodejs && \
echo "**** install runtime dependencies ****" && \
apt-get install -y \
apt-get update && \
apt-get install -y --no-install-recommends \
git \
jq \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install code-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
@ -39,22 +33,13 @@ RUN \
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-armv7l.tar.gz" && \
tar xf /tmp/code-server.tar.gz -C \
/app/code-server --strip-components=1 && \
echo "**** patch 4.0.2 ****" && \
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
cd /app/code-server && \
npm i --production @node-rs/argon2; \
fi && \
echo "**** clean up ****" && \
apt-get purge --auto-remove -y \
build-essential \
nodejs && \
apt-get clean && \
rm -rf \
/config/* \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/etc/apt/sources.list.d/nodesource.list
/var/tmp/*
# add local files
COPY /root /

View File

@ -64,16 +64,6 @@ The architectures supported by this image are:
| arm64 | ✅ | arm64v8-\<version tag\> |
| armhf| ✅ | arm32v7-\<version tag\> |
## Version Tags
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
| Tag | Available | Description |
| :----: | :----: |--- |
| latest | ✅ | Stable releases |
| focal | ✅ | DEPRECATED (no longer updated, `latest` is rebased on focal) - Stable releases, based on Ubuntu Focal |
| development | ✅ | DEPRECATED (no longer updated) - Prereleases from their GitHub |
## Application Setup
Access the webui at `http://<your-ip>:8443`.
@ -266,6 +256,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.
* **20.02.22:** - Install using the official tarballs.
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.

View File

@ -26,11 +26,9 @@ available_architectures:
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
# development version
development_versions: true
development_versions: false
development_versions_items:
- { tag: "latest", desc: "Stable releases" }
- { tag: "focal", desc: "DEPRECATED (no longer updated, `latest` is rebased on focal) - Stable releases, based on Ubuntu Focal" }
- { tag: "development", desc: "DEPRECATED (no longer updated) - Prereleases from their GitHub" }
# container parameters
common_param_env_vars_enabled: true
@ -77,6 +75,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: "20.02.22:", desc: "Install using the official tarballs." }
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }

View File

@ -22,21 +22,10 @@ fi
[[ ! -f /config/.profile ]] && \
cp /root/.profile /config/.profile
# permissions
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
CORES=$(nproc --all)
# 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
else
# Set permissions on data mount
# do not decend into the workspace
chown -R abc:abc "$(ls /config -I workspace)"
# fix permissions (ignore contents of /config/workspace)
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
chown abc:abc /config/workspace
chmod 700 /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-code-server/run

View File

@ -0,0 +1 @@
3

View File

@ -0,0 +1,26 @@
#!/usr/bin/with-contenv bash
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
AUTH="password"
else
AUTH="none"
echo "starting with no password"
fi
if [ -z ${PROXY_DOMAIN+x} ]; then
PROXY_DOMAIN_ARG=""
else
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
fi
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8443" \
s6-setuidgid abc \
/app/code-server/bin/code-server \
--bind-addr 0.0.0.0:8443 \
--user-data-dir /config/data \
--extensions-dir /config/extensions \
--disable-telemetry \
--auth "${AUTH}" \
"${PROXY_DOMAIN_ARG}" \
"${DEFAULT_WORKSPACE:-/config/workspace}"

View File

@ -0,0 +1 @@
longrun

View File

@ -1,25 +0,0 @@
#!/usr/bin/with-contenv bash
if [ -n "${PASSWORD}" ] || [ -n "${HASHED_PASSWORD}" ]; then
AUTH="password"
else
AUTH="none"
echo "starting with no password"
fi
if [ -z ${PROXY_DOMAIN+x} ]; then
PROXY_DOMAIN_ARG=""
else
PROXY_DOMAIN_ARG="--proxy-domain=${PROXY_DOMAIN}"
fi
exec \
s6-setuidgid abc \
/app/code-server/bin/code-server \
--bind-addr 0.0.0.0:8443 \
--user-data-dir /config/data \
--extensions-dir /config/extensions \
--disable-telemetry \
--auth "${AUTH}" \
"${PROXY_DOMAIN_ARG}" \
"${DEFAULT_WORKSPACE:-/config/workspace}"