mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2024-11-22 20:15:41 +01:00
39 lines
1005 B
Docker
39 lines
1005 B
Docker
FROM ghcr.io/linuxserver/baseimage-ubuntu:arm32v7-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 \
|
||
apt-get update && \
|
||
apt-get install -y \
|
||
libatomic1 && \
|
||
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}_armhf.deb" && \
|
||
dpkg -i /tmp/code-server.deb && \
|
||
echo "**** clean up ****" && \
|
||
apt-get clean && \
|
||
rm -rf \
|
||
/config/* \
|
||
/tmp/* \
|
||
/var/lib/apt/lists/* \
|
||
/var/tmp/*
|
||
|
||
# add local files
|
||
COPY /root /
|
||
|
||
# ports and volumes
|
||
EXPOSE 8443
|