mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2025-08-12 17:17:19 +02:00
Improve Dockerfile formatting and readability
- Use consistent 2-space indentation throughout - Remove unnecessary comment blocks - Better organize ARG declarations - Improve line continuation formatting 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai>
This commit is contained in:
parent
3bfd17e0e2
commit
50c10ebcfa
18
Dockerfile
18
Dockerfile
@ -2,19 +2,17 @@
|
|||||||
|
|
||||||
FROM gabemendoza1/cloudcode-baseimage-ubuntu-fips:jammy-22.04
|
FROM gabemendoza1/cloudcode-baseimage-ubuntu-fips:jammy-22.04
|
||||||
|
|
||||||
# set version label
|
|
||||||
ARG BUILD_DATE
|
ARG BUILD_DATE
|
||||||
ARG VERSION
|
ARG VERSION
|
||||||
ARG CODE_RELEASE
|
ARG CODE_RELEASE
|
||||||
|
ARG DEBIAN_FRONTEND="noninteractive"
|
||||||
|
|
||||||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||||||
LABEL maintainer="civisanalytics"
|
LABEL maintainer="civisanalytics"
|
||||||
|
|
||||||
# environment settings
|
|
||||||
ARG DEBIAN_FRONTEND="noninteractive"
|
|
||||||
ENV HOME="/workspace"
|
ENV HOME="/workspace"
|
||||||
|
|
||||||
RUN \
|
RUN echo "**** install runtime dependencies ****" && \
|
||||||
echo "**** install runtime dependencies ****" && \
|
|
||||||
apt-get update && \
|
apt-get update && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
git \
|
git \
|
||||||
@ -22,18 +20,18 @@ RUN \
|
|||||||
nano \
|
nano \
|
||||||
net-tools \
|
net-tools \
|
||||||
sudo && \
|
sudo && \
|
||||||
|
\
|
||||||
echo "**** install code-server ****" && \
|
echo "**** install code-server ****" && \
|
||||||
if [ -z ${CODE_RELEASE+x} ]; then \
|
if [ -z ${CODE_RELEASE+x} ]; then \
|
||||||
CODE_RELEASE=$(curl -sX GET https://api.github.com/repos/coder/code-server/releases/latest \
|
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||'); \
|
| awk '/tag_name/{print $4;exit}' FS='[""]' | sed 's|^v||'); \
|
||||||
fi && \
|
fi && \
|
||||||
mkdir -p /app/code-server && \
|
mkdir -p /app/code-server && \
|
||||||
curl -o \
|
curl -o /tmp/code-server.tar.gz -L \
|
||||||
/tmp/code-server.tar.gz -L \
|
|
||||||
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
|
"https://github.com/coder/code-server/releases/download/v${CODE_RELEASE}/code-server-${CODE_RELEASE}-linux-amd64.tar.gz" && \
|
||||||
tar xf /tmp/code-server.tar.gz -C \
|
tar xf /tmp/code-server.tar.gz -C /app/code-server --strip-components=1 && \
|
||||||
/app/code-server --strip-components=1 && \
|
|
||||||
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
|
||||||
|
\
|
||||||
echo "**** clean up ****" && \
|
echo "**** clean up ****" && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf \
|
rm -rf \
|
||||||
@ -42,8 +40,6 @@ RUN \
|
|||||||
/var/lib/apt/lists/* \
|
/var/lib/apt/lists/* \
|
||||||
/var/tmp/*
|
/var/tmp/*
|
||||||
|
|
||||||
# add local files
|
|
||||||
COPY /root /
|
COPY /root /
|
||||||
|
|
||||||
# ports and volumes
|
|
||||||
EXPOSE 8443
|
EXPOSE 8443
|
||||||
|
Loading…
Reference in New Issue
Block a user