chromium-docker/Dockerfile
Git Commiter for 96-fromsofia.net fd6157d960 First commit
2023-02-27 00:55:00 +00:00

22 lines
747 B
Docker

# 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" ]