Skip to content

Instantly share code, notes, and snippets.

@ibnesayeed
Created July 28, 2016 00:42
Show Gist options
  • Select an option

  • Save ibnesayeed/40da010d9959cd8147b51b5659ded57b to your computer and use it in GitHub Desktop.

Select an option

Save ibnesayeed/40da010d9959cd8147b51b5659ded57b to your computer and use it in GitHub Desktop.
Dockerizing Electron WAIL
FROM ubuntu
MAINTAINER Sawood Alam <ibnesayeed@gmail.com>
RUN apt-get update && apt-get install -y libgtk2.0-0 libgconf-2-4 libasound2 libxtst6 libxss1 libnss3 xvfb libcanberra-gtk* firefox
RUN groupadd wail && useradd -m -g wail wail
ADD . /wail
ADD settings.json /home/wail/.config/wail/wail-settings/
RUN chown -R wail:wail /home/wail /wail
ENV JAVA_HOME=/wail/resources/app/bundledApps/openjdk
USER wail
CMD ["/wail/wail"]
{
"configured": true,
"base": "/wail/resources/app",
"bundledApps": "/wail/resources/app/bundledApps",
"logs": "/wail/resources/app/waillogs/wail.log",
"archives": "/wail/resources/app/config/archives.json",
"cdxIndexer": "/wail/resources/app/bundledApps/tomcat/webapps/bin/cdx-indexer",
"cdx": "/wail/resources/app/archiveIndexes",
"cdxTemp": "/wail/resources/app/archiveIndexes/combined_unsorted.cdxt",
"crawlerBean": "/wail/resources/app/crawler-beans.cxml",
"heritrixBin": "/wail/resources/app/bundledApps/heritrix-3.3.0/bin/heritrix",
"heritrixJob": "/wail/resources/app/bundledApps/heritrix-3.3.0/jobs",
"heritrix": {
"uri_heritrix": "https://127.0.0.1:8443",
"uir_engine": "https://localhost:8443/engine/",
"port": "8843",
"username": "lorem",
"password": "ipsum",
"login": "-a lorem:ipsum",
"path": "/wail/resources/app/bundledApps/heritrix-3.3.0",
"jobConf": "/wail/resources/app/crawler-beans.cxml",
"web_ui": "https://lorem:ipsum@localhost:8443",
"addJobDirectoryOptions": {
"method": "POST",
"uri": "https://localhost:8443/engine",
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"timeout": 15000,
"form": {
"action": "add",
"addPath": ""
},
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
},
"sendActionOptions": {
"method": "POST",
"uri": "https://localhost:8443/engine/job/",
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"timeout": 15000,
"form": {
"action": ""
},
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
},
"killOptions": {
"method": "POST",
"uri": "https://localhost:8443/engine",
"timeout": 15000,
"body": "im_sure=on&action=exit java process",
"headers": {
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
"Connection": "keep-alive"
},
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
},
"launchJobOptions": {
"method": "POST",
"uri": "https://localhost:8443/engine/job/",
"timeout": 15000,
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"form": {
"action": "launch"
},
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
},
"optionEngine": {
"method": "GET",
"uri": "https://localhost:8443/engine",
"timeout": 15000,
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
},
"buildOptions": {
"method": "POST",
"uri": "https://localhost:8443/engine/job/",
"timeout": 15000,
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"form": {
"action": "build"
},
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
},
"reScanJobs": {
"method": "POST",
"uri": "https://localhost:8443/engine",
"timeout": 5000,
"headers": {
"content-type": "application/x-www-form-urlencoded"
},
"form": {
"action": "rescan"
},
"auth": {
"username": "lorem",
"password": "ipsum",
"sendImmediately": false
},
"strictSSL": false,
"rejectUnauthorized": false,
"resolveWithFullResponse": true
}
},
"indexCDX": "/wail/resources/app/archiveIndexes/index.cdx",
"index": "/wail/resources/app/config/path-index.txt",
"jdk": "/wail/resources/app/bundledApps/openjdk",
"jobConf": "/wail/resources/app/crawler-beans.cxml",
"jre": "/wail/resources/app/bundledApps/openjdk/jre",
"memgator": "/wail/resources/app/bundledApps/memgator",
"tomcat": "/wail/resources/app/bundledApps/tomcat",
"warcs": "/wail/resources/app/archives",
"wayBackConf": "/wail/resources/app/bundledApps/tomcat/webapps/ROOT/WEB-INF/wayback.xml",
"wayback": {
"uri_tomcat": "http://localhost:8080/",
"uri_wayback": "http://localhost:8080/wayback/",
"allCDX": "/wail/resources/app/archiveIndexes/*.cdx",
"notIndexCDX": "!/wail/resources/app/archiveIndexes/index.cdx"
},
"isWindows": false,
"catalina": "export JAVA_HOME=/wail/resources/app/bundledApps/openjdk; export JRE_HOME=/wail/resources/app/bundledApps/openjdk/jre; sh /wail/resources/app/bundledApps/tomcat/bin/catalina.sh",
"tomcatStart": "export JAVA_HOME=/wail/resources/app/bundledApps/openjdk; export JRE_HOME=/wail/resources/app/bundledApps/openjdk/jre; sh /wail/resources/app/bundledApps/tomcat/bin/startup.sh",
"tomcatStartDarwin": "export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home; export JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home; sh /wail/resources/app/bundledApps/tomcat/bin/startup.sh",
"tomcatStop": "export JAVA_HOME=/wail/resources/app/bundledApps/openjdk; export JRE_HOME=/wail/resources/app/bundledApps/openjdk/jre; sh /wail/resources/app/bundledApps/tomcat/bin/shutdown.sh",
"tomcatStopDarwin": "export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home; export JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home; sh /wail/resources/app/bundledApps/tomcat/bin/shutdown.sh",
"heritrixStart": "export JAVA_HOME=/wail/resources/app/bundledApps/openjdk; export JRE_HOME=/wail/resources/app/bundledApps/openjdk/jre; /wail/resources/app/bundledApps/heritrix-3.3.0/bin/heritrix -a lorem:ipsum",
"heritrixStartDarwin": "export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home; export JRE_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home; /wail/resources/app/bundledApps/heritrix-3.3.0/bin/heritrix -a lorem:ipsum",
"memgatorQuery": "/wail/resources/app/bundledApps/memgator -a /wail/resources/app/config/archives.json",
"didFirstLoad": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment