-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
71 lines (52 loc) · 1.67 KB
/
Dockerfile
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM debian:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y curl wget novnc websockify supervisor nodejs npm \
tigervnc-standalone-server locales python3 python3-venv \
procps git sudo tesseract-ocr lxde-core
RUN apt-get remove -y xscreensaver && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Generate the required locale
# Set the locale
RUN sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \
locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV VNC_NO_PASSWORD=1
# Install VNC and setup without password
RUN mkdir -p ~/.vnc && \
echo "password" | vncpasswd -f > ~/.vnc/passwd && \
chmod 600 ~/.vnc/passwd
# Install code-server latest version
RUN curl -sL "https://raw.githubusercontent.com/gbrian/codx-cli/main/codx.sh" | bash -s
RUN curl -fsSL https://code-server.dev/install.sh | sh
# Install supervisor
ENV SUPERVISOR_DIR=/etc/supervisord
# Create supervisord directory
RUN mkdir -p $SUPERVISOR_DIR
COPY supervisor.conf $SUPERVISOR_DIR
RUN mkdir -p /projects
COPY . /projects/codx-junior
RUN rm -rf /projects/codx-junior/api/.venv
RUN chmod +x /projects/codx-junior/run_api.sh
RUN chmod +x /projects/codx-junior/run_client.sh
ENV PYTHONPATH=/projects/codx-junior/api
RUN git config --global --add safe.directory '*'
ENV DISPLAY=:1
ENV DISPLAY_WIDTH=1920
ENV DISPLAY_HEIGHT=1080
RUN codx chrome
RUN codx docker
# codx-junior API port
ENV API_PORT=9984
# codx-junior WEB port
ENV WEB_PORT=9983
# codx-junior code-server port
ENV CODER_PORT=9909
# codx-junior NOVNC port
ENV NOVNC_PORT=9986
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
CMD ["/entrypoint.sh"]