Commit db30e84d authored by nanahira's avatar nanahira

novnc

parent 54a2efbb
Pipeline #3068 passed with stage
in 3 minutes and 7 seconds
ARG BASE_IMAGE=git-registry.mycard.moe/nanahira/docker-mirai-cqhttp:x
FROM ${BASE_IMAGE}
RUN apt update && \
apt -y install python3 git x11vnc xvfb socat npm && \
npm install -g pm2 && \
git clone --depth=1 https://github.com/kanaka/noVNC.git /usr/src/noVNC && \
git clone --depth=1 https://github.com/kanaka/websockify.git /usr/src/noVNC/utils/websockify \
&& sed -i -- "s/ps -p/ps -o pid | grep/g" /usr/src/noVNC/utils/launch.sh \
&& rm -rf /usr/src/noVNC/.git /usr/src/noVNC/utils/websockify/.git \
&& apt -y purge git \
&& apt -y autoremove && \
rm -rf /var/tmp/* /tmp/* /var/lib/apt/lists/*
ENV HOME=/root \
DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
LC_ALL=C.UTF-8 \
DISPLAY=:0.0 \
DISPLAY_WIDTH=425 \
DISPLAY_HEIGHT=900
#COPY ./novnc-supervisord.conf /etc/supervisor/conf.d/supervisord.conf
COPY ./pm2-novnc.json /usr/src/app/pm2-novnc.json
CMD ["pm2-docker", "/usr/src/app/pm2-novnc.json"]
[supervisord]
nodaemon=true
[program:X11]
command=Xvfb :0 -screen 0 425x900x24
autorestart=true
[program:x11vnc]
command=/usr/bin/x11vnc
autorestart=true
[program:novnc]
command=/usr/src/noVNC/utils/launch.sh --vnc localhost:5900 --listen 8080
autorestart=true
[program:socat]
command=socat tcp-listen:6000,reuseaddr,fork unix:/tmp/.X11-unix/X0
autorestart=true
[program:mirai]
command=java -jar ./mcl.jar
directory=/usr/src/app
autorestart=true
{
"apps": [
{
"name": "x11",
"script": "bash",
"args": " -c 'Xvfb :0 -screen 0 ${DISPLAY_WIDTH}x${DISPLAY_HEIGHT}x24'"
},
{
"name": "x11vnc",
"script": "/usr/bin/x11vnc"
},
{
"name": "novnc",
"script": "/usr/src/noVNC/utils/launch.sh",
"args": "--vnc localhost:5900 --listen 8080",
"interpreter": "bash"
},
{
"name": "socat",
"script": "socat",
"args": "tcp-listen:6000,reuseaddr,fork unix:/tmp/.X11-unix/X0"
},
{
"name": "mirai",
"script": "java",
"cwd": "/usr/src/app",
"args": "-jar ./mcl.jar"
}
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment