Skip to content

Commit

Permalink
"Just works" dockerized gcups
Browse files Browse the repository at this point in the history
This is just gcups working in docker using xvfb-run and fixed dbus
  • Loading branch information
fajfer authored Apr 2, 2024
1 parent 89a39c3 commit 1c41287
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM docker.io/ubuntu:jammy-20240227
RUN apt-get update && apt-get install -y wget gpg xvfb libgbm-dev libasound2 && \
# GC UPS App official setup
wget -qO- https://gcups-static.greencell.global/csgsa-keyring.gpg | gpg --dearmor | dd of=/usr/share/keyrings/csgsa-keyring.gpg && \
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/csgsa-keyring.gpg] https://gcups-static.greencell.global/deb stable non-free" | dd of=/etc/apt/sources.list.d/gcups.list && \
apt-get update -y && apt-get install -y gcups && \
rm -rf var/lib/apt/lists/*

EXPOSE 8080
COPY init.sh /opt/init.sh
ENTRYPOINT ["/opt/init.sh"]
7 changes: 7 additions & 0 deletions init.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

dbus-daemon --session --fork --print-address 1 > /tmp/dbus-session
export DBUS_SESSION_BUS_ADDRESS=$(cat /tmp/dbus-session)
service dbus start

xvfb-run gcups -vvv --no-sandbox

0 comments on commit 1c41287

Please sign in to comment.