mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-12-23 19:07:42 +01:00
62 lines
1.5 KiB
Docker
62 lines
1.5 KiB
Docker
|
FROM lsiobase/ubuntu:arm64v8-bionic
|
|||
|
|
|||
|
# 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 \
|
|||
|
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 - && \
|
|||
|
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
|
|||
|
> /etc/apt/sources.list.d/nodesource.list && \
|
|||
|
echo "**** install build dependencies ****" && \
|
|||
|
apt-get update && \
|
|||
|
apt-get install -y \
|
|||
|
build-essential \
|
|||
|
libx11-dev \
|
|||
|
libxkbfile-dev \
|
|||
|
libsecret-1-dev \
|
|||
|
pkg-config && \
|
|||
|
echo "**** install runtime dependencies ****" && \
|
|||
|
apt-get install -y \
|
|||
|
git \
|
|||
|
jq \
|
|||
|
nano \
|
|||
|
net-tools \
|
|||
|
nodejs \
|
|||
|
sudo && \
|
|||
|
echo "**** install code-server ****" && \
|
|||
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
|||
|
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
|
|||
|
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
|
|||
|
fi && \
|
|||
|
CODE_VERSION=$(echo "$CODE_RELEASE" | awk '{print substr($1,2); }') && \
|
|||
|
npm install --unsafe-perm -g code-server@"$CODE_VERSION" && \
|
|||
|
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 \
|
|||
|
/tmp/* \
|
|||
|
/var/lib/apt/lists/* \
|
|||
|
/var/tmp/*
|
|||
|
|
|||
|
# add local files
|
|||
|
COPY /root /
|
|||
|
|
|||
|
# ports and volumes
|
|||
|
EXPOSE 8443
|