Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build MTPlayer docker container #41

Open
cc13com opened this issue Sep 14, 2020 · 0 comments
Open

Unable to build MTPlayer docker container #41

cc13com opened this issue Sep 14, 2020 · 0 comments

Comments

@cc13com
Copy link

cc13com commented Sep 14, 2020

Hello,

I'm using your JDownloader docker container a while and I'm happy. Now I tried to implement my own container based on your baseimage to run MTPlayer, Java-File.

The dockerfile loads jlesage/baseimage-gui:alpine-3.9-glibc-v3.5.2, install openjdk11, download MTPlayer and try to start MTPlayer:

`
FROM jlesage/baseimage-gui:alpine-3.9-glibc-v3.5.2

ARG DOCKER_IMAGE_VERSION=unknown

ARG MTPLAYER_URL=https://www.p2tools.de/extra/download/MTPlayer-9.zip

WORKDIR /tmp

RUN \
    add-pkg --virtual build-dependencies curl p7zip && \
    curl -# -L -o MTPlayer-9.zip ${MTPLAYER_URL} && \
    7za x MTPlayer-9.zip && \
    del-pkg build-dependencies

RUN \
    apk --no-cache add openjdk11 --repository=http://dl-cdn.alpinelinux.org/alpine/edge/community
    
COPY rootfs/ /

WORKDIR /tmp/MTPlayer

ENV APP_NAME="MTPlayer" \
    S6_KILL_GRACETIME=8000

VOLUME ["/config"]
VOLUME ["/output"]`

I know there is a lot of optimization (e.g. volumes), but I tried first to run the app and after I will make it nice.

In rootfs there is a file called startapp.sh with the following lines:

#!/bin/sh
java -Djava.awt.headless=false -jar ./MTPlayer.jar "$@"

I build the image with docker build -t mtplayer . and the build-process-output looks fine. When I try to start the container with

docker run -it -p 5800:5800 mtplayer

I get the following error:

[12:59:59] INFO:         Proxy Authentication: not configured
Exception in thread "main" java.lang.UnsupportedOperationException: Unable to open DISPLAY
        at com.sun.glass.ui.gtk.GtkApplication.lambda$new$6(GtkApplication.java:173)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at com.sun.glass.ui.gtk.GtkApplication.<init>(GtkApplication.java:171)
        at com.sun.glass.ui.gtk.GtkPlatformFactory.createApplication(GtkPlatformFactory.java:41)
        at com.sun.glass.ui.Application.run(Application.java:144)
        at com.sun.javafx.tk.quantum.QuantumToolkit.startup(QuantumToolkit.java:258)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:269)
        at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
        at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
        at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:678)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
        at java.base/java.lang.Thread.run(Thread.java:834)

Any idea how I can solve this please?

Carsten

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant