Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
niawag authored Nov 17, 2023
1 parent c7df269 commit 7888bac
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,32 @@
FROM alpine:3.16
FROM alpine:3.18.4

LABEL maintainer="Carlos Remuzzi <carlosremuzzi@gmail.com>"
LABEL maintainer="niawag <niawag.flexget@gmail.com>"
LABEL org.label-schema.description="Containerization of mpv.io"
LABEL org.label-schema.name="mpv"
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.vcs-url="https://github.com/cremuzzi/docker-mpv"
LABEL org.label-schema.vcs-url="https://github.com/niawag/docker-mpv"

RUN apk add --no-cache \
ffmpeg \
mesa-demos \
mesa-dri-intel \
mpv \
pulseaudio \
python3 \
ttf-dejavu \
&& ln -s python3 /usr/bin/python \
&& wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl \
&& chmod 755 /usr/local/bin/youtube-dl \
&& adduser -u 1000 -D mpv \
&& mkdir -p /home/mpv/media \
&& mkdir -p /home/mpv/ \
&& mkdir -p /data/ \
&& mkdir -p /home/mpv/.config/pulse \
&& echo "default-server = unix:/run/user/1000/pulse/native" > /home/mpv/.config/pulse/client.conf \
&& echo "autospawn = no" >> /home/mpv/.config/pulse/client.conf \
&& echo "daemon-binary = /bin/true" >> /home/mpv/.config/pulse/client.conf \
&& echo "enable-shm = false" >> /home/mpv/.config/pulse/client.conf \
&& mkdir -p /home/mpv/.config/mpv \
&& echo "UP add volume +2" > /home/mpv/.config/mpv/input.conf \
&& echo "DOWN add volume -2" >> /home/mpv/.config/mpv/input.conf \
&& chown -R mpv:mpv /home/mpv

USER mpv

WORKDIR /home/mpv/media
WORKDIR /home/mpv/

VOLUME ["/home/mpv/media"]
VOLUME ["/data"]

CMD ["ash"]

0 comments on commit 7888bac

Please sign in to comment.