50 lines
1.1 KiB
Docker

FROM codercom/code-server:latest
ARG FROM_DIR=./
USER root
# Update the package list and install required packages
RUN sudo apt-get update && apt-get install -y \
apt-utils \
rsync \
openssh-client \
software-properties-common \
build-essential \
zlib1g-dev \
libncurses5-dev \
libgdbm-dev \
libnss3-dev \
libssl-dev \
libreadline-dev \
libffi-dev \
libsqlite3-dev \
libbz2-dev \
curl \
wget \
jq
# ----------------------------------------
RUN mkdir -p /tmp
WORKDIR /tmp
RUN wget https://www.python.org/ftp/python/3.12.5/Python-3.12.5.tgz
RUN tar -xf Python-3.12.5.tgz
WORKDIR /tmp/Python-3.12.5
RUN ./configure --enable-optimizations --prefix=/usr
RUN make -j$(nproc)
RUN make altinstall
# ----------------------------------------
RUN rm /usr/bin/python3
RUN ln -s /usr/bin/python3.12 /usr/bin/python3
RUN ln -snf /usr/bin/pip3.12 /usr/bin/pip
COPY ./requirements.txt /
RUN pip install --upgrade pip --root-user-action=ignore
RUN pip install -r /requirements.txt --root-user-action=ignore
SHELL ["/bin/bash", "-c"]
WORKDIR /home/coder