jlesage / docker-baseimage-gui

A minimal docker baseimage to ease creation of X graphical application containers
MIT License
1.2k stars 179 forks source link

Request for VLC media player #115

Open MCZocker32 opened 11 months ago

MCZocker32 commented 11 months ago

Would it be possible to put VLC media player into a docker? Combined with Java for BD menus. The usecase would be to stream ISOs from a NAS without the need to open the file through network on a different client.

EricDuminil commented 1 month ago

The base image shouldn't include anything related to VLC, because most users won't need it.

You can modify https://github.com/jlesage/docker-baseimage-gui?tab=readme-ov-file#getting-started slightly in order to install VLC, though. The example is for xterm, but replacing xterm with vlc and vlc-qt does the trick.

Dockerfile:

# Pull base image.
FROM jlesage/baseimage-gui:alpine-3.19-v4

# Install vlc.
RUN add-pkg vlc-qt

# Copy the start script.
COPY startapp.sh /startapp.sh

# Set the name of the application.
RUN set-cont-env APP_NAME "VLC in VNC"

# Add a test video
ADD https://www.w3schools.com/tags/mov_bbb.mp4 /home/test.mp4
RUN chmod a+r /home/test.mp4

# Enable audio
ENV WEB_AUDIO=1

startapp.sh:

#!/bin/sh
exec /usr/bin/vlc --no-metadata-network-access --loop /home/test.mp4

Running chmod a+x startapp.sh && docker build -t docker-vlc . && docker run --rm -p 5800:5800 -p 5900:5900 docker-vlc should start a VLC app in the browser, available at localhost:5800.