diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f221413 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.6 + +ADD requirements.txt /safaribooks/requirements.txt +WORKDIR /safaribooks +RUN pip3 install --upgrade pip +RUN pip3 install -r requirements.txt \ No newline at end of file diff --git a/README.md b/README.md index b9bbc0f..a62346f 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,12 @@ It's really simple to use, just choose a book from the library and replace in th $ python3 safaribooks.py --cred "account_mail@mail.com:password01" XXXXXXXXXXXXX ``` +## Usage: +You can use Docker +```shell +$ docker-compose run safaribooks --cred "account_mail@mail.com:password01" XXXXXXXXXXXXX +``` + The ID is the digits that you find in the URL of the book description page: `https://www.safaribooksonline.com/library/view/book-name/XXXXXXXXXXXXX/` Like: `https://www.safaribooksonline.com/library/view/test-driven-development-with/9781491958698/` diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..ee0b9be --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ +version: '3' + +services: + safaribooks: + build: . + entrypoint: "/safaribooks/safaribooks.py" + volumes: + - ./:/safaribooks + working_dir: /safaribooks