forked from atlassian/docker-chromium-xvfb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a script to simplify testing changes to the project
Currently, each image has to be built and tested manually. This change allows for a single script to be executed that will build all of the images and run the samples as a form of test for the images.
- Loading branch information
1 parent
924842d
commit d9e4f6d
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# This script builds all the Docker images and runs the samples | ||
|
||
# Rebuild the base image | ||
docker build --pull -t markadams/chromium-xvfb -f images/base/Dockerfile images/base/ | ||
|
||
# Build Python 2 image | ||
docker build -f images/python2-onbuild/Dockerfile -t markadams/chromium-xvfb-py2:latest-onbuild images/python2-onbuild | ||
docker build -f samples/python2/Dockerfile -t markadams/chromium-xvfb-py2-sample samples/python2 | ||
|
||
# Build Python 3 image | ||
docker build -f images/python3-onbuild/Dockerfile -t markadams/chromium-xvfb-py3:latest-onbuild images/python3-onbuild | ||
docker build -f samples/python3/Dockerfile -t markadams/chromium-xvfb-py3-sample samples/python3 | ||
|
||
# Build JS images | ||
docker build -f images/js/Dockerfile-6.x -t markadams/chromium-xvfb-js:6 images/js | ||
docker build -f images/js-onbuild/Dockerfile-6.x -t markadams/chromium-xvfb-js:6-onbuild images/js-onbuild | ||
|
||
docker build -f images/js/Dockerfile-7.x -t markadams/chromium-xvfb-js:7 images/js | ||
docker build -f images/js-onbuild/Dockerfile-7.x -t markadams/chromium-xvfb-js:7-onbuild images/js-onbuild | ||
|
||
docker build -f samples/js/Dockerfile -t markadams/chromium-xvfb-js-sample samples/js | ||
|
||
# Run samples to test | ||
docker run --rm markadams/chromium-xvfb-py2-sample | ||
docker run --rm markadams/chromium-xvfb-py3-sample | ||
docker run --rm markadams/chromium-xvfb-js-sample |