2019-06-24 20:03:06 +02:00
|
|
|
|
FROM lsiobase/ubuntu: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 \
|
|
|
|
|
apt-get update && \
|
|
|
|
|
apt-get install -y \
|
2019-06-24 21:42:04 +02:00
|
|
|
|
git \
|
2019-07-01 21:48:53 +02:00
|
|
|
|
nano \
|
2019-07-09 23:29:50 +02:00
|
|
|
|
net-tools \
|
|
|
|
|
sudo && \
|
2019-06-24 20:03:06 +02:00
|
|
|
|
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 && \
|
|
|
|
|
curl -o \
|
|
|
|
|
/tmp/code.tar.gz -L \
|
2019-10-24 21:51:46 +02:00
|
|
|
|
"https://github.com/cdr/code-server/releases/download/${CODE_RELEASE}/code-server${CODE_RELEASE}-linux-x86_64.tar.gz" && \
|
2019-06-24 20:03:06 +02:00
|
|
|
|
tar xzf /tmp/code.tar.gz -C \
|
2019-06-26 02:19:14 +02:00
|
|
|
|
/usr/bin/ --strip-components=1 \
|
|
|
|
|
--wildcards code-server*/code-server && \
|
2019-06-24 20:03:06 +02:00
|
|
|
|
echo "**** clean up ****" && \
|
|
|
|
|
rm -rf \
|
|
|
|
|
/tmp/* \
|
|
|
|
|
/var/lib/apt/lists/* \
|
|
|
|
|
/var/tmp/*
|
|
|
|
|
|
|
|
|
|
# add local files
|
|
|
|
|
COPY /root /
|
|
|
|
|
|
|
|
|
|
# ports and volumes
|
|
|
|
|
EXPOSE 8443
|