Skip to content

Commit 2d41bc5

Browse files
author
hekra
committed
Dockerfile for QtWebDriver
1 parent acf966b commit 2d41bc5

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

docker/Dockerfile

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Dockerfile to build a Webdriver for QT5
2+
# Check port mapping when running the container
3+
# e.g: docker run -p port:port image
4+
5+
FROM alexzaporozhets/ubuntu-qt5.4.2
6+
MAINTAINER Hugues Ekra <hekra@cisco.com>
7+
LABEL vendor="Cisco Systems"
8+
LABEL license="LGPLv2.1"
9+
LABEL version="1.3.3"
10+
11+
# Qt root dir, adjusted according to the base Qt5 image
12+
ENV QTDIR "/opt/Qt5.4.2/5.4/gcc_64"
13+
ENV QT_PLUGIN_PATH $QTDIR/plugins
14+
15+
# Build
16+
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 \
20+
&& cd qtwebdriver \
21+
&& cp ./qt5_sample_config.gypi ./wd.gypi \
22+
&& sed -i "s@\/home\/hekra01\/qt@$QTDIR@g" wd.gypi \
23+
&& ./build.sh
24+
25+
# hardcoded path, wait for fix https://github.com/docker/docker/issues/29110
26+
# ENV WD_PATH "$dirname(find "$PWD" -name WebDriver -executable)"
27+
ENV WD_PATH /opt/qtwebdriver/out/dist/desktop/release/bin
28+
ENV PATH $PATH:$WD_PATH
29+
30+
# 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/

0 commit comments

Comments
 (0)