docker-code-server/Dockerfile
Gabe Mendoza 50c10ebcfa 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>
2025-07-21 22:46:12 -05:00

46 lines
1.3 KiB
Docker

# syntax=docker/dockerfile:1
FROM gabemendoza1/cloudcode-baseimage-ubuntu-fips:jammy-22.04
ARG BUILD_DATE
ARG VERSION
ARG CODE_RELEASE
ARG DEBIAN_FRONTEND="noninteractive"
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="civisanalytics"
ENV HOME="/workspace"
RUN echo "**** install runtime dependencies ****" && \
apt-get update && \
apt-get install -y \
git \
libatomic1 \
nano \
net-tools \
sudo && \
\
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 && \
mkdir -p /app/code-server && \
curl -o /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" && \
tar xf /tmp/code-server.tar.gz -C /app/code-server --strip-components=1 && \
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
\
echo "**** clean up ****" && \
apt-get clean && \
rm -rf \
/config/* \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
COPY /root /
EXPOSE 8443