Skip to content

Commit c31cff9

Browse files
committed
extend docker mdbook to have build command
1 parent 16e254b commit c31cff9

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,19 @@ There is also a docker build that allows local build, serve, watch and live relo
4343
From the root of the repo, run:
4444

4545
```shell
46-
. docker/build-mdbook && . docker/run-mdbook
46+
. docker/build-mdbook-image && . docker/run-mdbook
4747
```
4848

4949
Once the book has built and is serving, visit `http://localhost:3000` in the browser.
5050

5151
You can edit the markdown files in `doc/holochain_101` and the book will live reload.
5252

53+
To do a one-time build of the files to HTML, run:
54+
55+
```shell
56+
. docker/build-mdbook
57+
```
58+
5359
## License
5460
[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0)
5561

docker/Dockerfile.mdbook

-2
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ WORKDIR /holochain/doc/holochain_101
88
EXPOSE 3000
99
# Port for websocket (live reload)
1010
EXPOSE 3001
11-
12-
CMD mdbook serve -i 0.0.0.0 -p 3000 -w 3001

docker/build-mdbook

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
docker build -f docker/Dockerfile.mdbook -t holochain/mdbook:latest "$@" .
2+
docker run --name holochain-mdbook --rm -v `pwd`:/holochain -it holochain/mdbook:latest mdbook build

docker/build-mdbook-image

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
docker build -f docker/Dockerfile.mdbook -t holochain/mdbook:latest "$@" .

docker/run-mdbook

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/bash
2-
docker run --name holochain-mdbook --rm -v `pwd`:/holochain -p 3000:3000 -p 3001:3001 -it holochain/mdbook:latest
2+
docker run --name holochain-mdbook --rm -v `pwd`:/holochain -p 3000:3000 -p 3001:3001 -it holochain/mdbook:latest mdbook serve -i 0.0.0.0 -p 3000 -w 3001

0 commit comments

Comments
 (0)