Skip to content

Commit 6c2348c

Browse files
author
hekra01
authored
Merge pull request #30 from cisco-open-source/WIP_Docker
Dockerfile for QtWebDriver
2 parents acf966b + 199c2aa commit 6c2348c

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

docker/Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Dockerfile to build a Webdriver for QT5
2+
# Check port mapping when running the container
3+
# e.g:
4+
# $ docker run -ti --rm -p 9531:9517 latest:latest --verbose
5+
6+
FROM alexzaporozhets/ubuntu-qt5.4.2
7+
#FROM icsinc/qt5.5.0-x64
8+
#FROM ubuntu:trusty
9+
MAINTAINER Hugues Ekra <[email protected]>
10+
LABEL vendor="Cisco Systems"
11+
LABEL license="LGPLv2.1"
12+
LABEL version="1.3.3"
13+
14+
#ENV QTDIR /opt/qt55
15+
ENV QTDIR "/opt/Qt5.4.2/5.4/gcc_64"
16+
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
20+
21+
# Build
22+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
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 \
26+
&& cd qtwebdriver \
27+
&& cp ./qt5_sample_config.gypi ./wd.gypi \
28+
&& sed -i "s@\/home\/hekra01\/qt@$QTDIR@g" wd.gypi \
29+
&& ./build.sh
30+
31+
# hardcoded path, wait for fix https://github.com/docker/docker/issues/29110
32+
ENV WD_PATH /opt/qtwebdriver/out/dist/desktop/release/bin
33+
ENV PATH $PATH:$WD_PATH
34+
35+
# Run
36+
#ENTRYPOINT ["/bin/sh", "-c", "xvfb-run -a WebDriver"]
37+
ENTRYPOINT ["WebDriver"]

0 commit comments

Comments
 (0)