First commit

This commit is contained in:
Git Commiter for 96-fromsofia.net
2023-02-27 00:55:00 +00:00
commit fd6157d960
5 changed files with 67 additions and 0 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
# Use the latest alpine ISO
FROM alpine:latest
# Copy the static xcookie file and add the start-firefox.sh script
COPY xcookie /tmp/
ADD start-chromium.sh /
RUN chmod u+x /start-chromium.sh
# Add the necessary packages
RUN apk add alsa-utils xauth chromium
# Create a user and group firefox. Add the user to groups firefox; audio; video.
RUN adduser chromium -D ; addgroup chromium chromium ; addgroup chromium audio ; addgroup chromium video
# Create the asoundrc on the newly created user and insert the X11 cookie
RUN su -c 'echo -e "defaults.pcm.card 1;\ndefaults.pcm.device 0;\ndefaults.ctl.card 1;" > ~/.asoundrc' chromium
RUN su -c "xauth add $(cat /tmp/xcookie)" chromium
# Start the thingz
CMD [ "/bin/sh", "/start-chromium.sh" ]