mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-22 20:15:41 +01:00
rebase to jammy, switch to s6v3, fix chown
This commit is contained in:
parent
c2fa63001f
commit
04cdba5c2b
28
Dockerfile
28
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:focal
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:jammy
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -8,20 +8,13 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
|||||||
LABEL maintainer="aptalca"
|
LABEL maintainer="aptalca"
|
||||||
|
|
||||||
# environment settings
|
# environment settings
|
||||||
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
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 ****" && \
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
libatomic1 \
|
libatomic1 \
|
||||||
@ -31,7 +24,7 @@ RUN \
|
|||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
mkdir -p /app/code-server && \
|
mkdir -p /app/code-server && \
|
||||||
curl -o \
|
curl -o \
|
||||||
@ -39,22 +32,13 @@ RUN \
|
|||||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
|
"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 \
|
tar xf /tmp/code-server.tar.gz -C \
|
||||||
/app/code-server --strip-components=1 && \
|
/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 ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
|
||||||
build-essential \
|
|
||||||
nodejs && \
|
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/config/* \
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/* \
|
/var/tmp/*
|
||||||
/etc/apt/sources.list.d/nodesource.list
|
|
||||||
|
|
||||||
# add local files
|
# add local files
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-jammy
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -8,20 +8,13 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
|||||||
LABEL maintainer="aptalca"
|
LABEL maintainer="aptalca"
|
||||||
|
|
||||||
# environment settings
|
# environment settings
|
||||||
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
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 ****" && \
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
libatomic1 \
|
libatomic1 \
|
||||||
@ -31,7 +24,7 @@ RUN \
|
|||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
mkdir -p /app/code-server && \
|
mkdir -p /app/code-server && \
|
||||||
curl -o \
|
curl -o \
|
||||||
@ -39,22 +32,13 @@ RUN \
|
|||||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-arm64.tar.gz" && \
|
"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 \
|
tar xf /tmp/code-server.tar.gz -C \
|
||||||
/app/code-server --strip-components=1 && \
|
/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 ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
|
||||||
build-essential \
|
|
||||||
nodejs && \
|
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/config/* \
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/* \
|
/var/tmp/*
|
||||||
/etc/apt/sources.list.d/nodesource.list
|
|
||||||
|
|
||||||
# add local files
|
# add local files
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-jammy
|
||||||
|
|
||||||
# set version label
|
# set version label
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
@ -8,20 +8,13 @@ LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DA
|
|||||||
LABEL maintainer="aptalca"
|
LABEL maintainer="aptalca"
|
||||||
|
|
||||||
# environment settings
|
# environment settings
|
||||||
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
ENV HOME="/config"
|
ENV HOME="/config"
|
||||||
|
|
||||||
RUN \
|
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 ****" && \
|
echo "**** install runtime dependencies ****" && \
|
||||||
apt-get install -y \
|
apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
libatomic1 \
|
libatomic1 \
|
||||||
@ -31,7 +24,7 @@ RUN \
|
|||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
||||||
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
mkdir -p /app/code-server && \
|
mkdir -p /app/code-server && \
|
||||||
curl -o \
|
curl -o \
|
||||||
@ -39,22 +32,13 @@ RUN \
|
|||||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-armv7l.tar.gz" && \
|
"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 \
|
tar xf /tmp/code-server.tar.gz -C \
|
||||||
/app/code-server --strip-components=1 && \
|
/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 ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get purge --auto-remove -y \
|
|
||||||
build-essential \
|
|
||||||
nodejs && \
|
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
/config/* \
|
/config/* \
|
||||||
/tmp/* \
|
/tmp/* \
|
||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/* \
|
/var/tmp/*
|
||||||
/etc/apt/sources.list.d/nodesource.list
|
|
||||||
|
|
||||||
# add local files
|
# add local files
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
11
README.md
11
README.md
@ -64,16 +64,6 @@ The architectures supported by this image are:
|
|||||||
| arm64 | ✅ | arm64v8-\<version tag\> |
|
| arm64 | ✅ | arm64v8-\<version tag\> |
|
||||||
| armhf| ✅ | arm32v7-\<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
|
## Application Setup
|
||||||
|
|
||||||
Access the webui at `http://<your-ip>:8443`.
|
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
|
## 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.
|
* **20.02.22:** - Install using the official tarballs.
|
||||||
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
|
* **29.12.21:** - Add `install-extension` as a helper for mods to install extensions.
|
||||||
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
|
* **06.12.21:** - Add `DEFAULT_WORKSPACE` env var.
|
||||||
|
@ -26,11 +26,9 @@ available_architectures:
|
|||||||
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
|
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
|
||||||
|
|
||||||
# development version
|
# development version
|
||||||
development_versions: true
|
development_versions: false
|
||||||
development_versions_items:
|
development_versions_items:
|
||||||
- { tag: "latest", desc: "Stable releases" }
|
- { 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
|
# container parameters
|
||||||
common_param_env_vars_enabled: true
|
common_param_env_vars_enabled: true
|
||||||
@ -77,6 +75,7 @@ app_setup_block: |
|
|||||||
|
|
||||||
# changelog
|
# changelog
|
||||||
changelogs:
|
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: "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: "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." }
|
- { date: "06.12.21:", desc: "Add `DEFAULT_WORKSPACE` env var." }
|
||||||
|
21
root/etc/cont-init.d/30-config → root/etc/s6-overlay/s6-rc.d/init-code-server/run
Normal file → Executable file
21
root/etc/cont-init.d/30-config → root/etc/s6-overlay/s6-rc.d/init-code-server/run
Normal file → Executable file
@ -22,21 +22,6 @@ fi
|
|||||||
[[ ! -f /config/.profile ]] && \
|
[[ ! -f /config/.profile ]] && \
|
||||||
cp /root/.profile /config/.profile
|
cp /root/.profile /config/.profile
|
||||||
|
|
||||||
# permissions
|
# fix permissions (ignore contents of /config/workspace)
|
||||||
if [ -f "/usr/bin/find" ] && [ -f "/usr/bin/xargs" ]; then
|
find /config -path /config/workspace -prune -o -exec chown abc:abc {} +
|
||||||
CORES=$(nproc --all)
|
chown abc:abc /config/workspace
|
||||||
|
|
||||||
# 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)"
|
|
||||||
chown abc:abc /config/workspace
|
|
||||||
fi
|
|
1
root/etc/s6-overlay/s6-rc.d/init-code-server/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-code-server/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
oneshot
|
1
root/etc/s6-overlay/s6-rc.d/init-code-server/up
Normal file
1
root/etc/s6-overlay/s6-rc.d/init-code-server/up
Normal file
@ -0,0 +1 @@
|
|||||||
|
/etc/s6-overlay/s6-rc.d/init-code-server/run
|
0
root/etc/services.d/code-server/run → root/etc/s6-overlay/s6-rc.d/svc-code-server/run
Normal file → Executable file
0
root/etc/services.d/code-server/run → root/etc/s6-overlay/s6-rc.d/svc-code-server/run
Normal file → Executable file
1
root/etc/s6-overlay/s6-rc.d/svc-code-server/type
Normal file
1
root/etc/s6-overlay/s6-rc.d/svc-code-server/type
Normal file
@ -0,0 +1 @@
|
|||||||
|
longrun
|
Loading…
Reference in New Issue
Block a user