[doc] Adds documentation about the new image

This commit is contained in:
Nemo 2019-01-31 21:23:37 +05:30
parent 2f4c533d06
commit 62ef2ba763
3 changed files with 30 additions and 9 deletions

View File

@ -16,7 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
wget \
zlib1g-dev \
file \
&& gem install bundler --no-ri --no-rdoc \
&& gem install bundler --no-rdoc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

View File

@ -12,14 +12,28 @@ Original sources are downloaded from https://landing.google.com/sre/
Requirements:
- Docker
- Docker. See [Getting Started Guide](https://docs.docker.com/get-started/)
There are two variants of the Docker Image:
### All Versions (EPUB/MOBI/PDF)
```
$ docker run --rm --volume "$(pwd):/output" captn3m0/google-sre-ebook:latest
```
- You should see the final EPUB/MOBI/PDF files in the `output` directory after the above runs.
- The file may be owned by the root user.
### Only EPUB
If you only require an EPUB file, there is a much slimmer image that is based on [Alpine Linux](https://alpinelinux.org/) instead of Ubuntu. (Image size is ~400MB instead of ~900MB for the all versions image). You may also use this if you already have calibre installed and can do the EPUB->MOBI or EPUB->PDF conversion elsewhere.
```
$ docker run --rm --volume "$(pwd):/output" captn3m0/google-sre-ebook:epub
```
### Docker Notes
You should see the final EPUB/MOBI/PDF files in the `output` directory after the above runs. The generated files may be owned by the root user.
**NOTE:** You'll have to allow docker access to a directory that's local to your system. The safest way to do this is as follows:
@ -29,7 +43,7 @@ $ chcon -Rt svirt_sandbox_file_t /tmp/sreoutput
$ docker run --rm --volume "/tmp/sreoutput:/output" captn3m0/google-sre-ebook:latest
```
The build for the above Docker image can be audited at <https://cloud.docker.com/swarm/captn3m0/repository/docker/captn3m0/google-sre-ebook/builds>.
The build for the above Docker images can be audited at <https://cloud.docker.com/swarm/captn3m0/repository/docker/captn3m0/google-sre-ebook/builds>.
## macOS
@ -37,17 +51,24 @@ Review and run the `bootstrap.sh` script to generate the EPUB, MOBI, and PDF fil
Requirements:
- Ruby
- `brew install pandoc wget ruby`
- `gem install bundler`
- `bundle install`
- `brew install pandoc`
- `brew cask install calibre`
- `brew install wget`
## Linux
Install the `ruby-bundler`, `pandoc-bin`, `wget`, and `calibre` packages.
## Running Locally
This requires bundler version>=2.0. Once you have the dependencies, just run `./bootstrap.sh`
# Known Issues
- metadata.xml is not complete. There are just too many authors
- Foreword/Preface is not part of the index
- Footnotes on PDFs don't work
# LICENSE

View File

@ -17,7 +17,7 @@ COPY Gemfile* /tmp/
WORKDIR /tmp
RUN gem install bundler --no-ri --no-document \
RUN gem install bundler --no-document \
&& bundle install
WORKDIR /src