mirror of
https://github.com/linuxserver/docker-code-server.git
synced 2026-02-20 05:13:57 +08:00
* ubuntu fips * 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> * remove extraneous file * remove jenkins things * remove extra files * Add docker-compose configuration for FIPS-compliant code-server - Add docker-compose.yml with build args for VERSION and CODE_RELEASE - Add .env.example with configurable environment variables - Update .gitignore and .dockerignore to exclude .env files - Set CODE_RELEASE default to 4.102.1 for stable builds - Configure image name: gabemendoza1/codecloud-code-server 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai> * simplify * update image * update image * update image * add netcat-openbsd * netcat * default ids 0 * remove extra files * remove more workflows * upgrade Python to 3.12 🤖 Generated with [opencode](https://opencode.ai) Co-Authored-By: opencode <noreply@opencode.ai> * add buildspec * update buildspec defs * update buildspec defs * ubuntu-fips-2 * fixed buildspec args * FIPS_REPOSITORY_URI * styling * update placeholders * latest * latest * put that thing back where it came from or so help me * only need 1 * simplify Dockerfile * no need ignores * no need ignores * simplify * remove comment * trigger codebuild * jammy --------- Co-authored-by: opencode <noreply@opencode.ai>
85 lines
2.6 KiB
Docker
85 lines
2.6 KiB
Docker
# syntax=docker/dockerfile:1
|
||
|
||
ARG ECR_ACCOUNT_ID
|
||
ARG ECR_REGION=us-east-1
|
||
ARG BASE_IMAGE_NAME=docker-linuxserver-ubuntu-fips
|
||
ARG BASE_IMAGE_TAG=jammy
|
||
ARG ECR_URI=${ECR_ACCOUNT_ID}.dkr.ecr-fips.${ECR_REGION}.amazonaws.com/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}
|
||
|
||
FROM ${ECR_URI} as docker-code-server-python
|
||
|
||
ARG DEBIAN_FRONTEND="noninteractive"
|
||
|
||
# Install Python 3.12
|
||
RUN echo "**** install Python 3.12 ****" && \
|
||
apt-get update && \
|
||
apt-get install -y \
|
||
software-properties-common \
|
||
gpg-agent && \
|
||
curl -fsSL https://keyserver.ubuntu.com/pks/lookup?op=get\&search=0xF23C5A6CF475977595C89F51BA6932366A755776 | apt-key add - && \
|
||
echo "deb https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy main" > /etc/apt/sources.list.d/deadsnakes.list && \
|
||
apt-get update && \
|
||
apt-get install -y \
|
||
python3.12 \
|
||
python3.12-dev \
|
||
python3.12-venv && \
|
||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 && \
|
||
update-alternatives --install /usr/bin/python python /usr/bin/python3.12 1 && \
|
||
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.12 && \
|
||
pip3 install --upgrade pip setuptools wheel && \
|
||
python3 --version && \
|
||
pip3 --version && \
|
||
echo "**** clean up ****" && \
|
||
apt-get clean && \
|
||
rm -rf \
|
||
/var/lib/apt/lists/* \
|
||
/tmp/*
|
||
|
||
FROM docker-code-server-python
|
||
ARG BUILD_DATE
|
||
ARG VERSION
|
||
ARG CODE_RELEASE
|
||
|
||
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
||
LABEL maintainer="civisanalytics"
|
||
|
||
# environment settings
|
||
ARG DEBIAN_FRONTEND="noninteractive"
|
||
ENV HOME="/config"
|
||
|
||
RUN \
|
||
echo "**** install runtime dependencies ****" && \
|
||
apt-get update && \
|
||
apt-get install -y \
|
||
git \
|
||
libatomic1 \
|
||
nano \
|
||
net-tools \
|
||
netcat-openbsd \
|
||
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/*
|
||
|
||
# add local files
|
||
COPY /root /
|
||
|
||
# ports and volumes
|
||
EXPOSE 8443
|