mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-22 12:05:41 +01:00
35 lines
919 B
Docker
35 lines
919 B
Docker
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm64v8-focal
|
||
|
||
# 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 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||'); \
|
||
fi && \
|
||
curl -o \
|
||
/tmp/code-server.deb -L \
|
||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server_${CODE_RELEASE}_arm64.deb" && \
|
||
dpkg -i /tmp/code-server.deb && \
|
||
echo "**** clean up ****" && \
|
||
rm -rf \
|
||
/config/* \
|
||
/tmp/* \
|
||
/var/lib/apt/lists/* \
|
||
/var/tmp/*
|
||
|
||
# add local files
|
||
COPY /root /
|
||
|
||
# ports and volumes
|
||
EXPOSE 8443
|