Bookdocker is a tool that makes a Docker container that runs Bookbinder.
Bookdocker does the following:
- Checks if Docker is installed
- Checks that you are in a
book
directory. - Creates a custom container with the following:
- Ruby v2.3.0
- Your book's dependencies, including Bookbinder
- Runs Bookbinder in the Docker container
Before you can run bookdocker, you must have Docker installed and running.
To install Docker, do the following:
- To download Docker for Mac, see Install Docker for Mac.
- To download Docker for Windows, see Install Docker for Windows.
After you install Docker, start the application and wait for Docker to indicate that it is running successfully.
To install bookdocker, do the following:
-
Clone the bookdocker repository.
git clone https://github.com/pivotal-cf-experimental/bookdocker.git
-
Copy the
bookdocker
file into your executable path. For example:cp ~/workspace/bookdocker/bookdocker /usr/local/bin
To install updates to bookdocker, do the following:
-
Go to your bookdocker repository. For example:
cd ~/workspace/bookdocker
-
Pull changes.
git pull
-
Copy the
bookdocker
file into your executable path. For example:cp ~/workspace/bookdocker/bookdocker /usr/local/bin
After you installed bookdocker, do the following:
-
Go to your book directory.
-
Run bookdocker. Bookdocker takes the same commands and arguments that Bookbinder takes.
Example 1, to watch a single repo of the book:
bookdocker watch MY-CONTENT-REPO
Example 2, to watch all the repos of the book:
bookdocker watch
Note: The first time you run bookdocker in a new
book
repository, the bookdocker creates the Docker image and takes a long time to execute. Bookdocker is faster in following runs.
Symptom | Solution |
---|---|
Error message Get https://registry-1.docker.io/v2/library/ruby/manifests/2.3: unauthorized: incorrect username or password |
Enter docker logout and type original command again. |
On large books, bookdocker is slow enough to become unusable on Mac machines. To mitigate this issue, you can do the following:
- Watch a single repository at a time. For example, run
bookdocker watch MY-CONTENT-REPO
. - Watch small books that bind few content repos.
bookdocker is licensed under the MIT license. See the LICENSE file for more information.