Skip to content

Commit

Permalink
Add a docker file
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasBora committed Jan 30, 2018
1 parent 731a5ef commit b99d034
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
33 changes: 33 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM ubuntu:16.04
# To build this image, run:
# $ sudo docker build -t scribd-d .
# And to run it:
# $ docker run -it --shm-size 2g scribd-d bash
# And then inside the container (don't forget xvfb):
# $ xvfb-run ./scribd_downloader_3.py "https://www.scribd.com/doc/63942746/chopin-nocturne-n-20-partition" out.pdf


RUN apt-get update && apt-get install -y wget python3 python3-pip firefox xvfb

# Set the working directory to /app
WORKDIR /app

# Copy the current directory contents into the container at /app
ADD . /app

# Make sure we have the latest pip version
RUN pip3 install --upgrade pip

# Install requirements
RUN pip3 install -r requirements.txt

# Make sure the script is executable
RUN chmod +x scribd_downloader_3.py

# Download geckodriver
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linux64.tar.gz
RUN tar zxvf geckodriver-v0.19.0-linux64.tar.gz

# Set-up the environment variables
ENV PATH="/app:${PATH}"

3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
selenium
fpdf
Pillow

0 comments on commit b99d034

Please sign in to comment.