Skip to content

Commit b55b470

Browse files
authored
Merge pull request #125 from linuxserver/jammy
rebase to jammy, switch to s6v3, fix chown
2 parents c2fa630 + 300d1a2 commit b55b470

File tree

17 files changed

+60
-121
lines changed

17 files changed

+60
-121
lines changed

Dockerfile

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
22

33
# set version label
44
ARG BUILD_DATE
@@ -8,53 +8,38 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
88
LABEL maintainer="aptalca"
99

1010
# environment settings
11+
ARG DEBIAN_FRONTEND="noninteractive"
1112
ENV HOME="/config"
1213

1314
RUN \
14-
echo "**** install node repo ****" && \
15-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
16-
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
17-
> /etc/apt/sources.list.d/nodesource.list && \
18-
echo "**** install build dependencies ****" && \
19-
apt-get update && \
20-
apt-get install -y \
21-
build-essential \
22-
nodejs && \
2315
echo "**** install runtime dependencies ****" && \
24-
apt-get install -y \
16+
apt-get update && \
17+
apt-get install -y --no-install-recommends \
2518
git \
2619
jq \
2720
libatomic1 \
2821
nano \
2922
net-tools \
23+
netcat \
3024
sudo && \
3125
echo "**** install code-server ****" && \
3226
if [ -z ${CODE_RELEASE+x} ]; then \
3327
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
34-
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
28+
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
3529
fi && \
3630
mkdir -p /app/code-server && \
3731
curl -o \
3832
/tmp/code-server.tar.gz -L \
3933
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
4034
tar xf /tmp/code-server.tar.gz -C \
4135
/app/code-server --strip-components=1 && \
42-
echo "**** patch 4.0.2 ****" && \
43-
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
44-
cd /app/code-server && \
45-
npm i --production @node-rs/argon2; \
46-
fi && \
4736
echo "**** clean up ****" && \
48-
apt-get purge --auto-remove -y \
49-
build-essential \
50-
nodejs && \
5137
apt-get clean && \
5238
rm -rf \
5339
/config/* \
5440
/tmp/* \
5541
/var/lib/apt/lists/* \
56-
/var/tmp/* \
57-
/etc/apt/sources.list.d/nodesource.list
42+
/var/tmp/*
5843

5944
# add local files
6045
COPY /root /

Dockerfile.aarch64

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
22

33
# set version label
44
ARG BUILD_DATE
@@ -8,53 +8,38 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
88
LABEL maintainer="aptalca"
99

1010
# environment settings
11+
ARG DEBIAN_FRONTEND="noninteractive"
1112
ENV HOME="/config"
1213

1314
RUN \
14-
echo "**** install node repo ****" && \
15-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
16-
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
17-
> /etc/apt/sources.list.d/nodesource.list && \
18-
echo "**** install build dependencies ****" && \
19-
apt-get update && \
20-
apt-get install -y \
21-
build-essential \
22-
nodejs && \
2315
echo "**** install runtime dependencies ****" && \
24-
apt-get install -y \
16+
apt-get update && \
17+
apt-get install -y --no-install-recommends \
2518
git \
2619
jq \
2720
libatomic1 \
2821
nano \
2922
net-tools \
23+
netcat \
3024
sudo && \
3125
echo "**** install code-server ****" && \
3226
if [ -z ${CODE_RELEASE+x} ]; then \
3327
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
34-
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
28+
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
3529
fi && \
3630
mkdir -p /app/code-server && \
3731
curl -o \
3832
/tmp/code-server.tar.gz -L \
3933
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-arm64.tar.gz" && \
4034
tar xf /tmp/code-server.tar.gz -C \
4135
/app/code-server --strip-components=1 && \
42-
echo "**** patch 4.0.2 ****" && \
43-
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
44-
cd /app/code-server && \
45-
npm i --production @node-rs/argon2; \
46-
fi && \
4736
echo "**** clean up ****" && \
48-
apt-get purge --auto-remove -y \
49-
build-essential \
50-
nodejs && \
5137
apt-get clean && \
5238
rm -rf \
5339
/config/* \
5440
/tmp/* \
5541
/var/lib/apt/lists/* \
56-
/var/tmp/* \
57-
/etc/apt/sources.list.d/nodesource.list
42+
/var/tmp/*
5843

5944
# add local files
6045
COPY /root /

Dockerfile.armhf

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
1+
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy
22

33
# set version label
44
ARG BUILD_DATE
@@ -8,53 +8,38 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
88
LABEL maintainer="aptalca"
99

1010
# environment settings
11+
ARG DEBIAN_FRONTEND="noninteractive"
1112
ENV HOME="/config"
1213

1314
RUN \
14-
echo "**** install node repo ****" && \
15-
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
16-
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
17-
> /etc/apt/sources.list.d/nodesource.list && \
18-
echo "**** install build dependencies ****" && \
19-
apt-get update && \
20-
apt-get install -y \
21-
build-essential \
22-
nodejs && \
2315
echo "**** install runtime dependencies ****" && \
24-
apt-get install -y \
16+
apt-get update && \
17+
apt-get install -y --no-install-recommends \
2518
git \
2619
jq \
2720
libatomic1 \
2821
nano \
2922
net-tools \
23+
netcat \
3024
sudo && \
3125
echo "**** install code-server ****" && \
3226
if [ -z ${CODE_RELEASE+x} ]; then \
3327
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
34-
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
28+
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
3529
fi && \
3630
mkdir -p /app/code-server && \
3731
curl -o \
3832
/tmp/code-server.tar.gz -L \
3933
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-armv7l.tar.gz" && \
4034
tar xf /tmp/code-server.tar.gz -C \
4135
/app/code-server --strip-components=1 && \
42-
echo "**** patch 4.0.2 ****" && \
43-
if [ "${CODE_RELEASE}" = "4.0.2" ] && [ "$(uname -m)" != "x86_64" ]; then \
44-
cd /app/code-server && \
45-
npm i --production @node-rs/argon2; \
46-
fi && \
4736
echo "**** clean up ****" && \
48-
apt-get purge --auto-remove -y \
49-
build-essential \
50-
nodejs && \
5137
apt-get clean && \
5238
rm -rf \
5339
/config/* \
5440
/tmp/* \
5541
/var/lib/apt/lists/* \
56-
/var/tmp/* \
57-
/etc/apt/sources.list.d/nodesource.list
42+
/var/tmp/*
5843

5944
# add local files
6045
COPY /root /

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,6 @@ The architectures supported by this image are:
6464
| arm64 || arm64v8-\<version tag\> |
6565
| armhf|| arm32v7-\<version tag\> |
6666

67-
## Version Tags
68-
69-
This image provides various versions that are available via tags. Please read the descriptions carefully and exercise caution when using unstable or development tags.
70-
71-
| Tag | Available | Description |
72-
| :----: | :----: |--- |
73-
| latest || Stable releases |
74-
| focal || DEPRECATED (no longer updated, `latest` is rebased on focal) - Stable releases, based on Ubuntu Focal |
75-
| development || DEPRECATED (no longer updated) - Prereleases from their GitHub |
76-
7767
## Application Setup
7868

7969
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
266256

267257
## Versions
268258

259+
* **29.09.22:** - Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents.
269260
* **20.02.22:** - Install using the official tarballs.
270261
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
271262
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.

readme-vars.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,9 @@ available_architectures:
2626
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
2727

2828
# development version
29-
development_versions: true
29+
development_versions: false
3030
development_versions_items:
3131
- { tag: "latest", desc: "Stable releases" }
32-
- { tag: "focal", desc: "DEPRECATED (no longer updated, `latest` is rebased on focal) - Stable releases, based on Ubuntu Focal" }
33-
- { tag: "development", desc: "DEPRECATED (no longer updated) - Prereleases from their GitHub" }
3432

3533
# container parameters
3634
common_param_env_vars_enabled: true
@@ -77,6 +75,7 @@ app_setup_block: |
7775
7876
# changelog
7977
changelogs:
78+
- { date: "29.09.22:", desc: "Rebase to jammy, switch to s6v3. Fix chown logic to skip `/config/workspace` contents." }
8079
- { date: "20.02.22:", desc: "Install using the official tarballs." }
8180
- { date: "29.12.21:", desc: "Add `install-extension` as a helper for mods to install extensions." }
8281
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }

root/etc/s6-overlay/s6-rc.d/init-code-server/dependencies.d/init-config

Whitespace-only changes.

root/etc/cont-init.d/30-config renamed to root/etc/s6-overlay/s6-rc.d/init-code-server/run

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,10 @@ fi
2222
[[ ! -f /config/.profile ]] && \
2323
cp /root/.profile /config/.profile
2424

25-
# permissions
26-
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
27-
CORES=$(nproc --all)
28-
29-
# Split workload between config and workspace
30-
echo "setting permissions::configuration"
31-
find /config -path /config/workspace -prune -false -o -type d -print0 | \
32-
xargs --null -r --max-args=1 --max-procs=$((CORES*2*8)) \
33-
chown -R abc:abc
34-
35-
echo "setting permissions::workspace"
36-
chown abc:abc /config/workspace
37-
else
38-
# Set permissions on data mount
39-
# do not decend into the workspace
40-
chown -R abc:abc "$(ls /config -I workspace)"
41-
chown abc:abc /config/workspace
25+
# fix permissions (ignore contents of /config/workspace)
26+
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
27+
chown abc:abc /config/workspace
28+
chmod 700 /config/.ssh
29+
if [ -n "$(ls -A /config/.ssh)" ]; then
30+
chmod 600 /config/.ssh/*
4231
fi
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
oneshot
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/etc/s6-overlay/s6-rc.d/init-code-server/run

root/etc/s6-overlay/s6-rc.d/init-config-end/dependencies.d/init-code-server

Whitespace-only changes.

0 commit comments

Comments
 (0)