Skip to content
This repository has been archived by the owner on Jan 12, 2025. It is now read-only.

Commit

Permalink
organize repo, make gh action trigger less \n\n !build-containers
Browse files Browse the repository at this point in the history
  • Loading branch information
IncognitoTGT committed Aug 5, 2024
1 parent b5cfa6a commit 3ef7e51
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 81 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,27 @@ name: Docker Image CI

on:
push:
branches: [ "main" ]
branches: ["main"]

jobs:

docker:

if: "!contains(github.event.head_commit.message, '!build-containers')"
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
run: bash buildx.sh
- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build the Docker image
run: bash scripts/buildx.sh
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stardust Images

Docker workspaces with TigerVNC preinstalled, created specifically for Stardust. However, these images can also be used independently.
Docker workspaces with Guac preinstalled, created specifically for Stardust. However, these images can also be used independently.

Additionally, a Fastify server is included for file upload and download functionality.

Expand All @@ -12,4 +12,4 @@ To run the Docker image, use the following command (using Debian as an example):
docker run -it --rm -p 5901:5901 -p 6080:6080 ghcr.io/spaceness/debian:latest
```

This command will start the Docker container and open the required ports for TigerVNC and the agent.
This command will start the Docker container and open the required ports for Guac and the agent.
17 changes: 8 additions & 9 deletions chromium/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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 \
wget curl inetutils-ping imagemagickvimtigervnc-tools tigervnc-standalone-server tigervnc-common \
chromium && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
Expand All @@ -25,13 +25,12 @@ USER stardust
RUN touch /home/stardust/.Xresources /home/stardust/.Xauthority

COPY ./server ./server
COPY ./start.sh ./start.sh
COPY ./chromium/xstartup ./xstartup

RUN cp ./xstartup /home/stardust/.vnc/xstartup && \
chmod +x /home/stardust/.vnc/xstartup && \
cd server && sudo npm i -g pnpm tsx && sudo pnpm i && sudo pnpm build

RUN cd server && \
sudo npm i -g pnpm tsx && \
sudo pnpm i && \
sudo pnpm build
COPY ./scripts/start.sh ./start.sh
COPY ./chromium/xstartup /home/stardust/.vnc/xstartup
RUN sudo chmod +x /home/stardust/.vnc/xstartup
CMD ["bash", "start.sh"]

EXPOSE 5901 6080
18 changes: 9 additions & 9 deletions debian-kde/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /app

RUN apt-get update && apt-get install -y \
xfonts-75dpi xvfb passwd sudo dbus dbus-x11 libxrandr2 libxext-dev libxrender-dev libxtst-dev \
python3 python3-pip xterm procps python3-numpy wget curl inetutils-ping imagemagick nano \
python3 python3-pip xterm procps python3-numpy wget curl inetutils-ping imagemagickvim\
kde-plasma-desktop breeze firefox-esr kwin-x11 plasma-discover tigervnc-tools tigervnc-standalone-server \
tigervnc-common && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
Expand All @@ -26,13 +26,13 @@ USER stardust
RUN touch /home/stardust/.Xresources /home/stardust/.Xauthority

COPY ./server ./server
COPY ./start.sh ./start.sh
COPY ./debian-kde/xstartup ./xstartup

RUN cp ./xstartup /home/stardust/.vnc/xstartup && \
chmod +x /home/stardust/.vnc/xstartup && \
cd server && sudo npm i -g pnpm tsx && sudo pnpm i && sudo pnpm build

RUN cd server && \
sudo npm i -g pnpm tsx && \
sudo pnpm i && \
sudo pnpm build
COPY ./scripts/start.sh ./start.sh
COPY ./debian-kde/xstartup /home/stardust/.vnc/xstartup
RUN sudo chmod +x /home/stardust/.vnc/xstartup
RUN touch /home/stardust/.Xauthority
CMD ["bash", "start.sh"]

EXPOSE 5901 6080
14 changes: 7 additions & 7 deletions debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ LABEL org.opencontainers.image.source https://github.com/spaceness/stardust-imag
ENV USER=stardust
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 git procps python3-numpy neofetch xfce4 wget curl xfce4-goodies inetutils-ping firefox-esr chromium gimp imagemagick remmina remmina-plugin-vnc flatpak nano
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 remmina-plugin-rdp flatpak vim
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - &&\
apt-get install -y nodejs
RUN apt-get install --no-install-recommends -y \
Expand All @@ -18,16 +20,14 @@ 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
RUN touch /home/stardust/.Xresources /home/stardust/.Xauthority
COPY ./server ./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
COPY ./scripts/start.sh ./start.sh
COPY ./debian/xstartup /home/stardust/.vnc/xstartup
RUN sudo chmod +x /home/stardust/.vnc/xstartup
CMD ["bash", "start.sh"]
EXPOSE 5901 6080
17 changes: 8 additions & 9 deletions firefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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 \
wget curl inetutils-ping imagemagickvimtigervnc-tools tigervnc-standalone-server tigervnc-common \
firefox-esr && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
Expand All @@ -25,13 +25,12 @@ USER stardust
RUN touch /home/stardust/.Xresources /home/stardust/.Xauthority

COPY ./server ./server
COPY ./start.sh ./start.sh
COPY ./firefox/xstartup ./xstartup

RUN cp ./xstartup /home/stardust/.vnc/xstartup && \
chmod +x /home/stardust/.vnc/xstartup && \
cd server && sudo npm i -g pnpm tsx && sudo pnpm i && sudo pnpm build

RUN cd server && \
sudo npm i -g pnpm tsx && \
sudo pnpm i && \
sudo pnpm build
COPY ./scripts/start.sh ./start.sh
COPY ./firefox/xstartup /home/stardust/.vnc/xstartup
RUN sudo chmod +x /home/stardust/.vnc/xstartup
CMD ["bash", "start.sh"]

EXPOSE 5901 6080
17 changes: 8 additions & 9 deletions gimp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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 gimp && \
wget curl inetutils-ping imagemagickvimtigervnc-tools tigervnc-standalone-server tigervnc-common gimp && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && rm -rf /var/lib/apt/lists/*
Expand All @@ -24,13 +24,12 @@ USER stardust
RUN touch /home/stardust/.Xresources /home/stardust/.Xauthority

COPY ./server ./server
COPY ./start.sh ./start.sh
COPY ./gimp/xstartup ./xstartup

RUN cp ./xstartup /home/stardust/.vnc/xstartup && \
chmod +x /home/stardust/.vnc/xstartup && \
cd server && sudo npm i -g pnpm tsx && sudo pnpm i && sudo pnpm build

RUN cd server && \
sudo npm i -g pnpm tsx && \
sudo pnpm i && \
sudo pnpm build
COPY ./scripts/start.sh ./start.sh
COPY ./gimp/xstartup /home/stardust/.vnc/xstartup
RUN sudo chmod +x /home/stardust/.vnc/xstartup
CMD ["bash", "start.sh"]

EXPOSE 5901 6080
9 changes: 4 additions & 5 deletions pinball/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ 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 unzip xfwm4 xfce4-terminal xfce4-session xfconf xfce4-notifyd \
wget curl inetutils-ping imagemagick nano libsdl2-mixer-2.0-0 libsdl2-2.0-0 fluidsynth tigervnc-tools \
wget curl inetutils-ping imagemagickvimlibsdl2-mixer-2.0-0 libsdl2-2.0-0 fluidsynth tigervnc-tools \
tigervnc-standalone-server tigervnc-common && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y nodejs && \
Expand All @@ -25,11 +25,10 @@ USER stardust
RUN touch /home/stardust/.Xresources /home/stardust/.Xauthority

COPY ./server ./server
COPY ./start.sh ./start.sh
COPY ./pinball/xstartup ./xstartup
COPY ./scripts/start.sh ./start.sh
COPY ./pinball/xstartup /home/stardust/.vnc/xstartup

RUN cp ./xstartup /home/stardust/.vnc/xstartup && \
chmod +x /home/stardust/.vnc/xstartup && \
RUN sudo chmod +x /home/stardust/.vnc/xstartup && \
cd server && sudo npm i -g pnpm tsx && sudo pnpm i && sudo pnpm build

USER root
Expand Down
13 changes: 0 additions & 13 deletions build.sh → scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,9 @@ else
fi


push_flag=false
for arg in "$@"; do
if [ "$arg" == "-p" ]; then
push_flag=true
break
fi
done


for t in ${images[@]}; do
printf "$BANNER$BGREEN Building$OFF $BLUE$t$OFF\n"
docker build -t ghcr.io/spaceness/$t -f $t/Dockerfile .;
if $push_flag; then
printf "$BANNER$BBLUE Pushing$OFF Docker container$BLUE ghcr.io/spaceness/$t$OFF\n"
docker push ghcr.io/spaceness/$t
else
printf "\n$BANNER$BRED Skipping$OFF push for$BLUE ghcr.io/spaceness/$t$OFF\n\n"
fi
done
File renamed without changes.
File renamed without changes.

0 comments on commit 3ef7e51

Please sign in to comment.