Automated e2e base image build for Docker Hub
- Docker Ubuntu
Bionic 18.04
/Trusty 14.04
- Java Development Kit 8
OpenJDK
/AdoptOpenJDK
- Chrome with chrome driver version:
80.0.3987.106
- Firefox with gecko driver version:
0.26.0
- X Virtual Frame Buffer (xvfb)
v4 tags ww
- ubuntu-xvfb-jdk8
- bionic-xvfb-jdk8
- bionic-xvfb-jdk8-firefox
- bionic-xvfb-jdk8-chrome
- bionic-xvfb-jdk8-base
- trusty-xvfb-jdk8
- trusty-xvfb-jdk8-firefox
- trusty-xvfb-jdk8-chrome
- trusty-xvfb-jdk8-base
images
- Docker Ubuntu Trusty 14.04 base image including XVFB and JDK8
- Docker Ubuntu Trusty 14.04 image including Chrome browser, chrome driver, XVFB and JDK8
- Docker Ubuntu Trusty 14.04 image including Firefox browser, gecko driver, XVFB and JDK8
- Docker Ubuntu Trusty 14.04 image including Firefox and Chrome browsers, theirs web-drivers, XVFB and JDK8
web drivers sources
FROM daggerok/e2e:ubuntu-xvfb-jdk8
#/home/e2e/project-directory/
WORKDIR 'project-directory/'
ENTRYPOINT start-xvfb && ./gradlew test
COPY . .
FROM daggerok/e2e:bionic-xvfb-jdk8-v4
WORKDIR 'some-directory/'
ENTRYPOINT start-xvfb && ./gradlew test chrome
COPY . .
FROM daggerok/e2e:trusty-xvfb-jdk8
WORKDIR 'e2e-tests/'
ENTRYPOINT start-xvfb && ./gradlew test firefox
COPY . .
FROM daggerok/e2e:trusty-xvfb-jdk8-base-v4
#FROM daggerok/e2e:bionic-xvfb-jdk8-base-v4
RUN echo 'install browser, webdriver and use already installed and configured jdk8 + Xvfb based on Ubuntu 14.04'
# prepare tests/Dockerfile.firefox and build e2e test image as usual...
docker build -f ./tests/Dockerfile.firefox -t daggerok/e2e-tests:`date +%Y-%m-%d` ./tests
docker run --rm --name run-`date +%Y-%m-%d`-e2e-tests daggerok/e2e-tests:`date +%Y-%m-%d`
# build e2e test image as usual...
docker build -f ./tests/Dockerfile.firefox -t daggerok/e2e-tests:`date +%Y-%m-%d` ./tests
# create re-usable e2e data volume
docker volume create e2e-data || echo 'oops, volume exists...'
# run e2e tests
docker run --rm --name run-`date +%Y-%m-%d`-e2e-tests \
-v e2e-data:/home/e2e/.gradle/caches/modules-2/files-2.1 \
-v e2e-data:/home/e2e/.m2/repository \
daggerok/e2e-tests:`date +%Y-%m-%d`
To make it possible run e2e tests in chrome, you have to in addition configure --no-sandbox
ChromeOptions argument
in your tests, like so:
// ./mvnw test -Dselenide.browser=chrome -Dselenide.headless=true
if ("chrome".equals(Configuration.browser)) && Configuration.headless) {
ChromeOptions chromeOptions = new ChromeOptions().addArguments("--no-sandbox");
WebDriverRunner.setWebDriver(new ChromeDriver(chromeOptions));
}