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

QXcbConnection: Could not connect to display :0 #9

Closed ErroneousBosch closed 6 years ago

ErroneousBosch commented 6 years ago

Trying to create a Calibre docker based on this image, keep getting this error: QXcbConnection: Could not connect to display :0

Dockerfile:

FROM jlesage/baseimage-gui:ubuntu-16.04

RUN apt-get update && \
apt-get install -y  python wget xz-utils xdg-utils locales

RUN wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sh /dev/stdin

ENV LANG=en_US.UTF-8
RUN locale-gen en_US.UTF-8

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

# Set the name of the application.
ENV APP_NAME="Calibre"

startapp just contains a call to start calibre from /opt/calibre/ . Any insight appreciated.

jlesage commented 6 years ago

How do you start the container? I built the image with the same Dockerfile and started the container with docker run --rm -p 5800:5800 calibre: I was able to get the calibre wizard.

jlesage commented 6 years ago

My startapp.sh:

#!/bin/sh
exec /opt/calibre/calibre
ErroneousBosch commented 6 years ago

OK, suspect this was a portainer issue with it not updating the image when I told it to. One of my old builds must have been throwing the error. Sorry about that