mirror of
https://github.com/linuxserver/docker-code-server
synced 2025-06-26 18:27:40 +00:00
rebase to jammy, switch to s6v3, fix chown
This commit is contained in:
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
|
||||
ARG BUILD_DATE
|
||||
@@ -8,20 +8,13 @@ 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 \
|
||||
@@ -31,7 +24,7 @@ RUN \
|
||||
echo "**** install code-server ****" && \
|
||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||
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 && \
|
||||
mkdir -p /app/code-server && \
|
||||
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" && \
|
||||
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 /
|
||||
|
||||
Reference in New Issue
Block a user