Skip to content

Commit

Permalink
Dockerize
Browse files Browse the repository at this point in the history
```
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
```
  • Loading branch information
Ukaza Perdana committed Jun 23, 2023
1 parent 48ae994 commit 156d83c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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*.
Expand Down

0 comments on commit 156d83c

Please sign in to comment.