File size: 1,404 Bytes
73c7f3f
83e6f13
73c7f3f
2bf003e
2d3de13
 
 
 
2bf003e
2d3de13
 
 
2bf003e
2d3de13
2bf003e
 
 
 
 
 
 
1083646
73c7f3f
 
6453d15
2d3de13
 
 
83e6f13
73c7f3f
2bf003e
2d3de13
 
 
 
2bf003e
 
 
73c7f3f
2d3de13
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
FROM codercom/code-server:latest

USER root
RUN apt-get update && \
    apt-get install -y curl gnupg lsb-release software-properties-common
RUN echo "deb http://archive.ubuntu.com/ubuntu jammy main universe" \
     > /etc/apt/sources.list.d/jammy.list
RUN apt-get update && \
    apt-get install -y \
      python3.10 python3.10-venv python3.10-dev python3-pip \
      build-essential git wget unzip nano zip ca-certificates \
      net-tools xz-utils openssh-client && \
    update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 1 && \
    ln -sf /usr/bin/python3.10 /usr/bin/python && \
    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/*

RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel \
    && pip3 install --no-cache-dir ipython virtualenv jupyter

RUN mkdir -p /home/coder/project && chown -R coder:coder /home/coder/project
USER coder

ENV PASSWORD=hfspacespassword \
    PORT=7860 \
    HOME=/home/coder

RUN mkdir -p ~/.config/code-server && \
    echo '{ \
      "bind-addr": "0.0.0.0:7860", \
      "auth": "password", \
      "password": "'"${PASSWORD}"'", \
      "cert": false \
    }' > ~/.config/code-server/config.json

WORKDIR /home/coder/project
EXPOSE 7860
CMD ["code-server","--port","7860","/home/coder/project"]