From d2429f45e66e031467d2841fb33a83a029372e99 Mon Sep 17 00:00:00 2001 From: Settel Date: Thu, 10 Apr 2025 17:38:11 +0200 Subject: [PATCH] feat: add Dockerfile --- Dockerfile | 32 ++++++++++++++++++++++++++++++ Makefile | 32 ++++++++++++++++++++++++++++++ files/etc/chromium.d/googleapikeys | 3 +++ 3 files changed, 67 insertions(+) create mode 100644 Dockerfile create mode 100644 Makefile create mode 100644 files/etc/chromium.d/googleapikeys diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3d9354d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,32 @@ +# based on https://github.com/jessfraz/dockerfiles/blob/master/chromium/Dockerfile +# modified by Settel +# +FROM debian:stable-slim +LABEL maintainer "Settel" + +RUN apt-get update && apt-get install -y \ + --no-install-recommends \ + fonts-liberation \ + fonts-roboto \ + hicolor-icon-theme \ + libcanberra-gtk-module \ + libexif-dev \ + libgl1-mesa-dri \ + libgl1-mesa-glx \ + libpangox-1.0-0 \ + libv4l-0 \ + fonts-symbola \ + chromium-l10n \ + chromium + +RUN rm -rf /var/lib/apt/lists/* /config/.cache /var/tmp/* /tmp/* + +RUN groupadd -r chromium && useradd -r -g chromium -G audio,video chromium \ + && mkdir -p /home/chromium/Downloads && chown -R chromium:chromium /home/chromium + +COPY files/ / + +USER chromium + +ENTRYPOINT [ "chromium" ] +CMD [ "--user-data-dir=/data" ] diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3540208 --- /dev/null +++ b/Makefile @@ -0,0 +1,32 @@ +VERSION=0.1 +SHELL=/bin/bash + +.PHONY: info + +info: + @echo "available targets:" + @perl -ne 'm/^([\w\-]+):/ && print(" $$1\n");' Makefile $(MAKEFILES) + +build: + podman build -t teams-pwa:$(VERSION) . + +run: + podman run -it \ + --rm \\ + --net host \ + --cpuset-cpus 0 \ + --memory 512mb \ + -v /tmp/.X11-unix:/tmp/.X11-unix \ + -e DISPLAY=unix$$DISPLAY \ + -v $$HOME/various/downloads:/home/chromium/Downloads \ + --security-opt seccomp=$$HOME/chrome.json \ + --device /dev/snd \ + --device /dev/dri \ + -v /dev/shm:/dev/shm \ + --name teams-pwa \ + teams-pwa:$(VERSION) + +# -v $HOME/.config/google-chrome/:/data \ # if you want to save state + +clean: + @echo "nothing to do (yet)" diff --git a/files/etc/chromium.d/googleapikeys b/files/etc/chromium.d/googleapikeys new file mode 100644 index 0000000..a1dabee --- /dev/null +++ b/files/etc/chromium.d/googleapikeys @@ -0,0 +1,3 @@ +export GOOGLE_API_KEY="AIzaSyCkfPOPZXDKNn8hhgu3JrA62wIgC93d44k" +export GOOGLE_DEFAULT_CLIENT_ID="811574891467.apps.googleusercontent.com" +export GOOGLE_DEFAULT_CLIENT_SECRET="kdloedMFGdGla2P1zacGjAQh"