OKAY / Dockerfile
Theright07's picture
Create Dockerfile
7d49a8c verified
Raw
History Blame Contribute Delete
1.01 kB
FROM ubuntu:22.04
# System tools, Desktop environment, VNC aur noVNC install karna
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
bash \
curl \
git \
net-tools \
novnc \
socat \
x11vnc \
xfce4 \
xfce4-terminal \
xvfb \
dbus-x11 \
websockify \
&& rm -rf /var/lib/apt/lists/*
# Hugging Face default user configuration
RUN useradd -m -u 1000 user
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH \
DISPLAY=:1
WORKDIR $HOME/app
# index.html link setup taaki 503 error na aaye
RUN ln -s /usr/share/novnc/vnc.html /usr/share/novnc/index.html
EXPOSE 7860
# BINA KISI START.SH FILE KE DIRECT COMMAND EXECUTION
CMD Xvfb :1 -screen 0 1024x768x16 & \
sleep 2 && \
dbus-launch --exit-with-session xfce4-session & \
sleep 2 && \
x11vnc -display :1 -nopw -forever -shared -bg -rfbport 5900 & \
sleep 2 && \
websockify --web=/usr/share/novnc 7860 localhost:5900