From 0933221033271cd6f0e4f5bccb8e1acea65c74d9 Mon Sep 17 00:00:00 2001 From: Nemo Date: Mon, 27 Apr 2020 09:24:23 +0530 Subject: [PATCH] Adds Dockerfile and LICENSE --- .dockerignore | 6 ++++++ Dockerfile | 12 ++++++++++++ LICENSE | 7 +++++++ README.md | 32 ++++++++++++++++++++++++-------- 4 files changed, 49 insertions(+), 8 deletions(-) create mode 100644 .dockerignore create mode 100644 Dockerfile create mode 100644 LICENSE diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..9e89dba --- /dev/null +++ b/.dockerignore @@ -0,0 +1,6 @@ +.git +REDME.md +Dockerfile +LICENSE +*.pdf +!cover.pdf diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cc4ec3e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM debian:10-slim + +RUN apt-get update && \ + mkdir -p /usr/share/man/man1/ && \ + apt-get install --yes pdftk wget ca-certificates && \ + apt-get clean + +WORKDIR /security-engineering-ebook + +COPY . /security-engineering-ebook + +ENTRYPOINT ["/security-engineering-ebook/generate.sh"] diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..1615a9b --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2020 Abhay Rana + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md index 4b55c13..a409512 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Go read the book from the source at ## Chapters -This list might be out of date, see the upstream source for actual list, and `urls.txt` for the one that the script uses. +See `titles.txt` for the bookmark titles used by the script. - Preface - Chapter 1: What is Security Engineering? (August 30) @@ -39,7 +39,23 @@ This list might be out of date, see the upstream source for actual list, and `ur ## How to generate the book? -Run `./generate.sh`. You will need `pdftk`, and `wget` installed. +Run `./generate.sh`. You will need `pdftk`, and `wget` installed. Alternatively, you can run it using Docker:grinning: + +### Docker + +``` +docker run --detach --name security-engineering-ebook captn3m0/security-engineering-ebook +7553d55547603b0e3d47332f4cd55a126ace10e0e965547b0fae06e3c7b16229 + +docker logs security-engineering-ebook -f +Starting PDF download +All PDFs downloaded +PDF files combined +Bookmarks attached to PDF +PDF File generated: security-engineering-3rd-edition.pdf + +docker cp security-engineering-ebook:/security-engineering-ebook/security-engineering-3rd-edition.pdf . +``` Once the script finishes running, check the `security-engineering-3rd-edition.pdf` file. @@ -66,16 +82,16 @@ Buy the second editions from: - [Amazon.co.uk](http://www.amazon.co.uk/exec/obidos/ASIN/0470068523/rossandersshomep) - [Kindle Version](http://www.amazon.co.uk/gp/product/B004BDOZI0/ref=as_li_tf_tl?ie=UTF8&tag=rossanderssho-21&linkCode=as2&camp=1634&creative=6738&creativeASIN=B004BDOZI0) -A combined official signed PDF of the first edition is available at +A combined PDF of the first edition is available directly from the author at . ## Contributing The list of URLs is maintained at `urls.txt` and might need to be updated. File a PR if this breaks? -## License - -The little code in this repo is under MIT. - ## Extra -A list of my other EBook generation projects: https://captnemo.in/ebooks/, includes a link to other related projects as well \ No newline at end of file +A list of my other EBook generation projects: https://captnemo.in/ebooks/, includes a link to other related projects as well + +## License + +The little code in this repo is licensed under the [MIT License](https://nemo.mit-license.org/). See LICENSE file for details.