diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +* diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0a9e8a6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,37 @@ +# +# Geckodriver Dockerfile +# + +FROM blueimp/basedriver + +# Add the Firefox release channel of the Debian Mozilla team: +RUN echo 'deb http://mozilla.debian.net/ jessie-backports firefox-release' >> \ + /etc/apt/sources.list \ + && curl -sL https://mozilla.debian.net/archive.asc | apt-key add - + +# Install Firefox: +RUN export DEBIAN_FRONTEND=noninteractive \ + && apt-get update \ + && apt-get install --no-install-recommends --no-install-suggests -y \ + firefox \ + # Remove obsolete files: + && apt-get clean \ + && rm -rf \ + /tmp/* \ + /usr/share/doc/* \ + /var/cache/* \ + /var/lib/apt/lists/* \ + /var/tmp/* + +# Install geckodriver: +RUN export BASE_URL=https://github.com/mozilla/geckodriver/releases/download \ + && export VERSION=$(curl -sL \ + https://api.github.com/repos/mozilla/geckodriver/releases/latest | \ + grep tag_name | cut -d '"' -f 4) \ + && curl -sL \ + $BASE_URL/$VERSION/geckodriver-$VERSION-linux64.tar.gz | tar -xz \ + && mv geckodriver /usr/local/bin/geckodriver + +USER webdriver + +CMD ["geckodriver", "--host", "0.0.0.0"] diff --git a/README.md b/README.md new file mode 100644 index 0000000..97b8cec --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# Geckodriver Dockerfile