Skip to content

Commit 156d83c

Browse files
author
Ukaza Perdana
committed
Dockerize
``` cd safaribooks docker build . -t safaribooks ``` ``` mkdir -p Books docker run --rm -v $(pwd)/Books:/app/Books safaribooks --cred "my_email@gmail.com:MyPassword1!" 9781491958698 ```
1 parent 48ae994 commit 156d83c

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM python:3.6
2+
3+
WORKDIR /app
4+
5+
COPY requirements.txt ./
6+
COPY Pipfile ./
7+
COPY Pipfile.lock ./
8+
COPY register_user.py ./
9+
COPY safaribooks.py ./
10+
COPY sso_cookies.py ./
11+
12+
RUN pip install --no-cache-dir -r requirements.txt
13+
14+
ENTRYPOINT [ "python", "./safaribooks.py" ]

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,22 @@ In this case, I suggest you to convert the `EPUB` to `AZW3` with Calibre or to `
170170
171171
---
172172
173+
## Using Docker
174+
175+
Build the image:
176+
177+
```shell
178+
$ cd safaribooks/
179+
$ docker build . -t safaribooks
180+
```
181+
182+
Similar to the example in the [previous section](#examples), but using Docker:
183+
184+
```shell
185+
$ mkdir -p Books
186+
$ docker run --rm -v $(pwd)/Books:/app/Books safaribooks --cred "my_email@gmail.com:MyPassword1!" 9781491958698
187+
```
188+
173189
## Thanks!!
174190
For any kind of problem, please don't hesitate to open an issue here on *GitHub*.
175191

0 commit comments

Comments
 (0)