Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/marcellodesales/firefox-xvfb-java-gradle-docker
Docker image with Headless Firefox (xvfb), Java and Gradle to run Selenium-based apps in container.
https://github.com/marcellodesales/firefox-xvfb-java-gradle-docker
Last synced: 26 days ago
JSON representation
Docker image with Headless Firefox (xvfb), Java and Gradle to run Selenium-based apps in container.
- Host: GitHub
- URL: https://github.com/marcellodesales/firefox-xvfb-java-gradle-docker
- Owner: marcellodesales
- License: mit
- Created: 2015-10-13T05:42:22.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-22T01:57:12.000Z (about 9 years ago)
- Last Synced: 2023-03-12T09:54:09.435Z (almost 2 years ago)
- Size: 160 KB
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
firefox-xvfb-java-gradle-docker
----Runs ANY Selenium-based application using Gradle. This base image can be used by ANY Java project that requires
running the application with a headless Firefox browser. That's ideal for automated test cases, Web Crawlers, etc.Running
-----Suppose you have the following java project with the following structure:
```
~/dev/github/public/quantogastei/commons on ⭠ master ⌚ 23:10:04
$ tree -L 3
.
├── build.gradle
├── README.md
├── settings.gradle
└── src
└── main
├── java
└── resources```
Run the following:
```
cd /your/java/root/dir
$ docker run -ti --rm -v ${PWD}:/usr/bin/app marcellodesales/gradle-firefox gradle YOUR_GRADLE_COMMAND
```For instance, you can run the `gradle jar` as follows:
```
~/dev/github/public/quantogastei/commons on ⭠ master! ⌚ 22:23:49
$ docker run -ti --rm -v ${PWD}:/usr/bin/app gradle-firefox gradle jar
Tue Oct 13 05:23:51 UTC 2015
Mozilla Firefox 41.0
Starting Xvfb ...
:compileJava
Download https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.pom
Download https://repo1.maven.org/maven2/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download https://repo1.maven.org/maven2/org/apache/apache/9/apache-9.pom
...
...
Download https://repo1.maven.org/maven2/com/google/code/gson/gson/2.3.1/gson-2.3.1.pom
Download https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-common/9.2.11.v20150529/websocket-common-9.2.11.v20150529.jar
Download https://repo1.maven.org/maven2/org/eclipse/jetty/websocket/websocket-api/9.2.11.v20150529/websocket-api-9.2.11.v20150529.jar
Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.10/commons-codec-1.10.jar
Note: /usr/bin/app/src/main/java/com/quantogastei/utils/QGAddressing.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:processResources UP-TO-DATE
:classes
:jar
Jar assembled at /usr/bin/app/build/libs/quantogastei-commons.jarBUILD SUCCESSFUL
Total time: 14.443 secs
This build could be faster, please consider using the Gradle Daemon: https://docs.gradle.org/2.7/userguide/gradle_daemon.html
```The artifacts are created inside the Docker Container and exposed through the `volume` used. That way, all the files from
the build are now available in both the built container, which was removed with `--rm`, and in the local file-system:```
~/dev/github/public/quantogastei/commons on ⭠ master ⌚ 23:10:04
$ tree -L 3
.
├── build
│ ├── classes
│ │ └── main
│ ├── dependency-cache
│ ├── libs
│ │ └── quantogastei-commons.jar
│ ├── resources
│ │ └── main
│ └── tmp
│ ├── compileJava
│ └── jar
├── build.gradle
├── README.md
├── settings.gradle
└── src
└── main
├── java
└── resources
```