Skip to content

Commit 199c2aa

Browse files
author
hekra
committed
Use Qt offscreen
1 parent 2d41bc5 commit 199c2aa

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

docker/Dockerfile

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,37 @@
11
# Dockerfile to build a Webdriver for QT5
22
# Check port mapping when running the container
3-
# e.g: docker run -p port:port image
3+
# e.g:
4+
# $ docker run -ti --rm -p 9531:9517 latest:latest --verbose
45

56
FROM alexzaporozhets/ubuntu-qt5.4.2
7+
#FROM icsinc/qt5.5.0-x64
8+
#FROM ubuntu:trusty
69
MAINTAINER Hugues Ekra <[email protected]>
710
LABEL vendor="Cisco Systems"
811
LABEL license="LGPLv2.1"
912
LABEL version="1.3.3"
1013

11-
# Qt root dir, adjusted according to the base Qt5 image
14+
#ENV QTDIR /opt/qt55
1215
ENV QTDIR "/opt/Qt5.4.2/5.4/gcc_64"
1316
ENV QT_PLUGIN_PATH $QTDIR/plugins
17+
ENV QT_QPA_PLATFORM offscreen
18+
ENV QT_QPA_FONTDIR /opt/Qt5.4.2/5.4/Src/qtbase/lib/fonts
19+
WORKDIR /opt
1420

1521
# Build
1622
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
17-
&& sudo apt-get update \
18-
&& sudo apt-get install -y g++ gyp xvfb x11-apps \
19-
&& git clone https://github.com/cisco-open-source/qtwebdriver \
23+
&& sudo apt-get update && sudo apt-get install -y \
24+
git g++ gyp xvfb libicu-dev libegl1-mesa-dev libgles2-mesa-dev \
25+
&& git clone --verbose --progress https://github.com/cisco-open-source/qtwebdriver \
2026
&& cd qtwebdriver \
2127
&& cp ./qt5_sample_config.gypi ./wd.gypi \
2228
&& sed -i "s@\/home\/hekra01\/qt@$QTDIR@g" wd.gypi \
2329
&& ./build.sh
2430

2531
# hardcoded path, wait for fix https://github.com/docker/docker/issues/29110
26-
# ENV WD_PATH "$dirname(find "$PWD" -name WebDriver -executable)"
2732
ENV WD_PATH /opt/qtwebdriver/out/dist/desktop/release/bin
2833
ENV PATH $PATH:$WD_PATH
2934

3035
# Run
31-
ENTRYPOINT ["/bin/sh", "-c", "xvfb-run -a WebDriver --verbose"]
32-
#CMD ["--verbose"]
33-
34-
# http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/
36+
#ENTRYPOINT ["/bin/sh", "-c", "xvfb-run -a WebDriver"]
37+
ENTRYPOINT ["WebDriver"]

0 commit comments

Comments
 (0)