Skip to content

Commit

Permalink
feat: add build webtop workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
chenchongbiao committed Sep 3, 2024
1 parent c2ef473 commit bfbf4c7
Show file tree
Hide file tree
Showing 4 changed files with 134 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build-webtop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build docker

on:
push:
branches: [ 'master' ]
paths:
- '**/webtop/**'
workflow_dispatch:

env:
owner: chenchongbiao

jobs:
build:
name: Build webtop image
runs-on: ubuntu-latest

steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Checkout repository
uses: actions/checkout@v4

- name: Build images
run: |
cd webtop/debian/gxde
docker buildx build --load --platform linux/amd64 -t ${{ env.owner }}/webtop:debian-gxde .
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Docker image push
run: |
docker push ${{ env.owner }}/webtop:debian-gxde
57 changes: 57 additions & 0 deletions webtop/debian/gxde/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
FROM ghcr.io/linuxserver/baseimage-kasmvnc:debianbookworm

# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
ENV TITLE="Debian gxde"

RUN \
echo "**** add icon ****" && \
curl -o \
/kclient/public/icon.png \
https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/webtop-logo.png && \
echo "deb [trusted=true] http://mirror.gxde.gfdgdxi.top/gxde-os-mirror ./" >> /etc/apt/sources.list.d/gxde.list && \
echo "**** install packages ****" && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
chromium \
chromium-l10n \
deepin-desktop-base \
dde-desktop \
libdmr0.1 \
dde-dock \
dde-launcher \
dde-control-center \
startdde \
dde-session-ui \
deepin-artwork \
dde-file-manager \
dde-qt5integration \
eject \
deepin-wallpapers \
dde-kwin \
deepin-terminal \
deepin-editor && \
echo "**** application tweaks ****" && \
sed -i \
's#^Exec=.*#Exec=/usr/local/bin/wrapped-chromium#g' \
/usr/share/applications/chromium.desktop && \
echo "**** cleanup ****" && \
apt-get autoclean && \
rm -rf \
/config/.cache \
/var/lib/apt/lists/* \
/var/tmp/* \
/tmp/*

# add local files
COPY /root /

# ports and volumes
EXPOSE 3000
VOLUME /config
21 changes: 21 additions & 0 deletions webtop/debian/gxde/root/defaults/startwm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

# Enable Nvidia GPU support if detected
if which nvidia-smi; then
export LIBGL_KOPPER_DRI2=1
export MESA_LOADER_DRIVER_OVERRIDE=zink
export GALLIUM_DRIVER=zink
fi

# Disable compositing and screen lock
# if [ ! -f $HOME/.config/kwinrc ]; then
# kwriteconfig5 --file $HOME/.config/kwinrc --group Compositing --key Enabled false
# fi
# if [ ! -f $HOME/.config/kscreenlockerrc ]; then
# kwriteconfig5 --file $HOME/.config/kscreenlockerrc --group Daemon --key Autolock false
# fi
setterm blank 0
setterm powerdown 0

# Launch DE
/usr/bin/startdde > /dev/null 2>&1
15 changes: 15 additions & 0 deletions webtop/debian/gxde/root/usr/local/bin/wrapped-chromium
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#! /bin/bash

BIN=/usr/bin/chromium

# Cleanup
if ! pgrep chromium > /dev/null;then
rm -f $HOME/.config/chromium/Singleton*
fi

# Run normally on privved containers or modified un non priv
if grep -q 'Seccomp:.0' /proc/1/status; then
${BIN} --password-store=basic "$@"
else
${BIN} --password-store=basic --no-sandbox --test-type "$@"
fi

0 comments on commit bfbf4c7

Please sign in to comment.