This repository has been archived by the owner on Jan 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
64c534f
commit a8f510a
Showing
1 changed file
with
23 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,33 @@ | ||
FROM debian:latest | ||
LABEL org.opencontainers.image.source https://github.com/spaceness/stardust-images | ||
|
||
ENV USER=stardust | ||
ENV PNPM_HOME="/home/${USER}/.local/share/pnpm" | ||
ENV PNPM_HOME="/home/stardust/.local/share/pnpm" | ||
WORKDIR /app | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
xfonts-75dpi xvfb passwd sudo dbus dbus-x11 libxrandr2 libxext-dev libxrender-dev libxtst-dev \ | ||
python3 python3-pip xterm procps python3-numpy \ | ||
xfwm4 xfce4-terminal xfce4-session xfconf xfce4-notifyd wget curl inetutils-ping imagemagick nano \ | ||
tigervnc-tools tigervnc-standalone-server tigervnc-common chromium && \ | ||
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ | ||
apt-get install -y nodejs && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN useradd --uid 1000 ${USER} && \ | ||
mkdir -p /run/dbus /home/${USER}/.vnc && \ | ||
chown -R ${USER}:${USER} /home/${USER} && \ | ||
chmod 777 /home/${USER} /app && \ | ||
echo "${USER} ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ | ||
usermod -aG sudo ${USER} | ||
|
||
USER ${USER} | ||
|
||
RUN apt-get update && apt-get install --no-install-recommends -y xfonts-75dpi xvfb passwd sudo dbus dbus-x11 libxrandr2 libxext-dev libxrender-dev libxtst-dev python3 python3-pip xterm git procps python3-numpy neofetch xfce4 wget curl xfce4-goodies inetutils-ping firefox-esr chromium gimp imagemagick remmina remmina-plugin-vnc flatpak nano | ||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\ | ||
apt-get install -y nodejs | ||
RUN apt-get install --no-install-recommends -y \ | ||
tigervnc-tools tigervnc-standalone-server tigervnc-common | ||
RUN mkdir -p /run/dbus | ||
RUN useradd --uid 1000 stardust | ||
RUN mkdir -p /home/stardust | ||
RUN chown stardust /home/stardust | ||
RUN chmod 777 /home/stardust | ||
RUN chmod 777 /app | ||
RUN echo "stardust ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers | ||
RUN usermod -aG sudo stardust | ||
USER stardust | ||
RUN mkdir -p /home/stardust/.vnc | ||
RUN touch /home/stardust/.Xresources | ||
COPY ./server ./server | ||
COPY ./start.sh ./start.sh | ||
COPY ./debian/xstartup ./xstartup | ||
|
||
RUN cp ./xstartup /home/${USER}/.vnc/xstartup && \ | ||
chmod +x /home/${USER}/.vnc/xstartup && \ | ||
touch /home/${USER}/.Xauthority && \ | ||
touch /home/${USER}/.Xresources && \ | ||
cd server && \ | ||
RUN cd server && \ | ||
sudo npm i -g pnpm tsx && \ | ||
sudo pnpm i && \ | ||
sudo pnpm build | ||
|
||
COPY ./start.sh ./start.sh | ||
COPY ./debian/xstartup ./xstartup | ||
RUN cp ./xstartup /home/stardust/.vnc/xstartup | ||
RUN chmod +x /home/stardust/.vnc/xstartup | ||
RUN touch /home/stardust/.Xauthority | ||
CMD ["bash", "start.sh"] | ||
|
||
EXPOSE 5901 6080 |