commit
3d41f4de5a
3 changed files with 9 additions and 24 deletions
12
Dockerfile
12
Dockerfile
|
|
@ -7,13 +7,12 @@ ARG DEBIAN_FRONTEND=noninteractive
|
|||
ENV SCREEN_WIDTH 1440
|
||||
ENV SCREEN_HEIGHT 900
|
||||
ENV SCREEN_DEPTH 24
|
||||
ENV DISPLAY :60
|
||||
|
||||
# Configure VNC via environment variables:
|
||||
ENV VNC_ENABLED true
|
||||
ENV VNC_PASSWORD secret
|
||||
ENV VNC_PORT 5900
|
||||
ENV NOVNC_PORT 6080
|
||||
ENV NOVNC_HOME /usr/share/novnc
|
||||
EXPOSE 5900
|
||||
EXPOSE 6080
|
||||
|
||||
|
|
@ -54,8 +53,8 @@ RUN apt-get update \
|
|||
/usr/share/doc/* \
|
||||
/var/cache/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/var/tmp/*
|
||||
|
||||
/var/tmp/* \
|
||||
&& ln -s $NOVNC_HOME/vnc_auto.html $NOVNC_HOME/index.html
|
||||
|
||||
WORKDIR /fgc
|
||||
COPY package.json .
|
||||
|
|
@ -70,10 +69,7 @@ COPY . .
|
|||
# Shell scripts
|
||||
RUN dos2unix ./docker/*.sh
|
||||
RUN mv ./docker/entrypoint.sh /usr/local/bin/entrypoint \
|
||||
&& chmod +x /usr/local/bin/entrypoint \
|
||||
&& mv ./docker/vnc-start.sh /usr/local/bin/vnc-start \
|
||||
&& chmod +x /usr/local/bin/vnc-start
|
||||
|
||||
&& chmod +x /usr/local/bin/entrypoint
|
||||
|
||||
ENTRYPOINT ["entrypoint"]
|
||||
CMD ["node", "epic-games.js"]
|
||||
|
|
|
|||
|
|
@ -12,10 +12,10 @@ rm -f /fgc/data/browser/SingletonLock
|
|||
# Options passed directly to the Xvfb server:
|
||||
# -ac disables host-based access control mechanisms
|
||||
# −screen NUM WxHxD creates the screen and sets its width, height, and depth
|
||||
Xvfb "$DISPLAY" -ac -screen 0 "${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH}" >/dev/null 2>&1 &
|
||||
|
||||
if [ "$VNC_ENABLED" = true ]; then
|
||||
vnc-start >/dev/null 2>&1 &
|
||||
fi
|
||||
|
||||
Xvfb :1 -ac -screen 0 "${SCREEN_WIDTH}x${SCREEN_HEIGHT}x${SCREEN_DEPTH}" >/dev/null 2>&1 &
|
||||
x11vnc -display :1.0 -forever -shared -rfbport "${VNC_PORT:-5900}" -passwd "${VNC_PASSWORD:-secret}" -bg
|
||||
websockify -D --web "$NOVNC_HOME" "$NOVNC_PORT" "localhost:$VNC_PORT" &
|
||||
DISPLAY=:1.0
|
||||
export DISPLAY
|
||||
exec tini -g -- "$@"
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Start VNC in a background process:
|
||||
x11vnc -display "$DISPLAY" -forever -shared -rfbport "${VNC_PORT:-5900}" \
|
||||
-passwd "${VNC_PASSWORD:-secret}" -bg
|
||||
NOVNC_HOME=/usr/share/novnc
|
||||
ln -s $NOVNC_HOME/vnc_auto.html $NOVNC_HOME/index.html
|
||||
websockify -D --web "$NOVNC_HOME" "$NOVNC_PORT" "localhost:$VNC_PORT" &
|
||||
|
||||
# Execute the given command:
|
||||
exec "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue