2021-11-29 19:00:15 +01:00
|
|
|
|
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-focal
|
2020-05-18 02:40:11 +02:00
|
|
|
|
|
|
|
|
|
# set version label
|
|
|
|
|
ARG BUILD_DATE
|
|
|
|
|
ARG VERSION
|
|
|
|
|
ARG CODE_RELEASE
|
|
|
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
|
|
|
LABEL maintainer="aptalca"
|
|
|
|
|
|
|
|
|
|
# environment settings
|
|
|
|
|
ENV HOME="/config"
|
|
|
|
|
|
|
|
|
|
RUN \
|
2021-05-08 16:50:21 +02:00
|
|
|
|
echo "**** install node repo ****" && \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get install -y \
|
|
|
|
|
gnupg && \
|
|
|
|
|
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
|
2021-11-29 19:00:15 +01:00
|
|
|
|
echo 'deb https://deb.nodesource.com/node_14.x focal main' \
|
2021-05-08 16:50:21 +02:00
|
|
|
|
> /etc/apt/sources.list.d/nodesource.list && \
|
|
|
|
|
curl -s https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
|
|
|
|
|
echo 'deb https://dl.yarnpkg.com/debian/ stable main' \
|
|
|
|
|
> /etc/apt/sources.list.d/yarn.list && \
|
|
|
|
|
echo "**** install build dependencies ****" && \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get install -y \
|
|
|
|
|
build-essential \
|
|
|
|
|
libx11-dev \
|
|
|
|
|
libxkbfile-dev \
|
2021-11-29 19:00:15 +01:00
|
|
|
|
pkg-config \
|
|
|
|
|
python3 && \
|
2021-05-08 16:50:21 +02:00
|
|
|
|
echo "**** install runtime dependencies ****" && \
|
|
|
|
|
apt-get install -y \
|
|
|
|
|
git \
|
|
|
|
|
jq \
|
|
|
|
|
nano \
|
|
|
|
|
net-tools \
|
|
|
|
|
nodejs \
|
|
|
|
|
sudo \
|
|
|
|
|
yarn && \
|
|
|
|
|
echo "**** install code-server ****" && \
|
|
|
|
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
|
|
|
|
CODE_RELEASE=$(curl -sX GET https://registry.yarnpkg.com/code-server \
|
|
|
|
|
| jq -r '."dist-tags".latest' | sed 's|^|v|'); \
|
|
|
|
|
fi && \
|
|
|
|
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
2021-11-29 19:00:15 +01:00
|
|
|
|
npm config set python python3 \
|
2021-05-08 16:50:21 +02:00
|
|
|
|
yarn config set network-timeout 600000 -g && \
|
|
|
|
|
yarn --production --verbose --frozen-lockfile global add code-server@"$CODE_VERSION" && \
|
|
|
|
|
yarn cache clean && \
|
|
|
|
|
echo "**** clean up ****" && \
|
|
|
|
|
apt-get purge --auto-remove -y \
|
|
|
|
|
build-essential \
|
|
|
|
|
libx11-dev \
|
|
|
|
|
libxkbfile-dev \
|
|
|
|
|
libsecret-1-dev \
|
|
|
|
|
pkg-config && \
|
|
|
|
|
apt-get clean && \
|
|
|
|
|
rm -rf \
|
2021-11-29 19:00:15 +01:00
|
|
|
|
/config/* \
|
2021-05-08 16:50:21 +02:00
|
|
|
|
/tmp/* \
|
|
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
|
/var/tmp/*
|
2020-05-18 02:40:11 +02:00
|
|
|
|
|
|
|
|
|
# add local files
|
|
|
|
|
COPY /root /
|
|
|
|
|
|
|
|
|
|
# ports and volumes
|
|
|
|
|
EXPOSE 8443
|