Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy

# set version label
ARG BUILD_DATE
Expand All @@ -8,6 +8,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"

# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"

RUN \
Expand All @@ -19,6 +20,7 @@ RUN \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install openvscode-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -8,6 +8,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"

# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"

RUN \
Expand All @@ -19,6 +20,7 @@ RUN \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install openvscode-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -8,6 +8,7 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
LABEL maintainer="aptalca"

# environment settings
ARG DEBIAN_FRONTEND="noninteractive"
ENV HOME="/config"

RUN \
Expand All @@ -19,6 +20,7 @@ RUN \
libatomic1 \
nano \
net-tools \
netcat \
sudo && \
echo "**** install openvscode-server ****" && \
if [ -z ${CODE_RELEASE+x} ]; then \
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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." }
Expand Down
30 changes: 9 additions & 21 deletions root/etc/cont-init.d/30-config → ...verlay/s6-rc.d/init-openvscode-server/run
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-openvscode-server/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
oneshot
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/init-openvscode-server/up
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/etc/s6-overlay/s6-rc.d/init-openvscode-server/run
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3
15 changes: 7 additions & 8 deletions root/etc/services.d/openvscode-server/run → ...overlay/s6-rc.d/svc-openvscode-server/run
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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 300 -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}
1 change: 1 addition & 0 deletions root/etc/s6-overlay/s6-rc.d/svc-openvscode-server/type
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
longrun
Empty file.
Empty file.