diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..43a2c5f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.6 + +WORKDIR /app + +COPY requirements.txt ./ +COPY Pipfile ./ +COPY Pipfile.lock ./ +COPY register_user.py ./ +COPY safaribooks.py ./ +COPY sso_cookies.py ./ + +RUN pip install --no-cache-dir -r requirements.txt + +ENTRYPOINT [ "python", "./safaribooks.py" ] \ No newline at end of file diff --git a/README.md b/README.md index bfd8fd7..2d32f7e 100644 --- a/README.md +++ b/README.md @@ -170,6 +170,22 @@ In this case, I suggest you to convert the `EPUB` to `AZW3` with Calibre or to ` --- +## Using Docker + +Build the image: + +```shell +$ cd safaribooks/ +$ docker build . -t safaribooks +``` + +Similar to the example in the [previous section](#examples), but using Docker: + +```shell +$ mkdir -p Books +$ docker run --rm -v $(pwd)/Books:/app/Books safaribooks --cred "my_email@gmail.com:MyPassword1!" 9781491958698 +``` + ## Thanks!! For any kind of problem, please don't hesitate to open an issue here on *GitHub*.