File size: 1,273 Bytes
73c7f3f
83e6f13
73c7f3f
c30bceb
6e984b7
2d3de13
2bf003e
c30bceb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c5092b6
 
 
 
 
2bf003e
6e984b7
c5092b6
088050c
1083646
6e984b7
73c7f3f
c30bceb
6e984b7
73c7f3f
6453d15
6e984b7
 
 
 
 
 
 
2bf003e
c30bceb
73c7f3f
c30bceb
6e984b7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
FROM codercom/code-server:latest

USER root

# Install system tools and dev environment
RUN apt-get update && \
    apt-get install -y \
        python3-pip \
        python3-venv \
        python3-dev \
        build-essential \
        git \
        curl \
        wget \
        unzip \
        nano \
        zip \
        ca-certificates \
        net-tools \
        xz-utils \
        openssh-client \
        lsb-release \
        software-properties-common && \
    curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
    apt-get install -y nodejs && \
    npm install -g npm yarn && \
    apt-get clean && rm -rf /var/lib/apt/lists/*

# Install Python libraries
RUN pip3 install --break-system-packages --no-cache-dir --upgrade pip setuptools wheel && \
    pip3 install --break-system-packages ipython virtualenv jupyter yt-dlp

# Setup workspace
RUN mkdir -p /home/coder/project && chown -R coder:coder /home/coder/project

# Switch back to non-root user
USER coder

ENV PORT=7860
ENV HOME=/home/coder

# Delay config writing until container run using entrypoint script
COPY --chown=coder:coder entrypoint.sh /home/coder/entrypoint.sh
RUN chmod +x /home/coder/entrypoint.sh

WORKDIR /home/coder/project

EXPOSE 7860

CMD ["/home/coder/entrypoint.sh"]