Skip to content

Commit 3e32c1a

Browse files
authored
Update README.md
1 parent a996422 commit 3e32c1a

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

+15-3
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,25 @@ Start writing posts quickly with docker
44
```
55
git clone https://github.com/wearearima/wearearima.github.io.git
66
$ cd wearearima.github.io
7-
$ docker run -p 4000:4000 --rm --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" -it jekyll/jekyll jekyll server
7+
$ docker run -p 4000:4000 --rm --volume="$PWD:/srv/jekyll" -it jekyll/jekyll jekyll server
88
```
99

1010
To see content in __draft_ folder
1111
```
1212
$ git clone https://github.com/wearearima/wearearima.github.io.git
1313
$ cd wearearima.github.io
14-
$ docker run -p 4000:4000 --rm --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" -it jekyll/jekyll jekyll server --draft
14+
$ docker run -p 4000:4000 --rm --volume="$PWD:/srv/jekyll" -it jekyll/jekyll jekyll server --draft
1515
```
16-
You can then access blog here: http://localhost:4000
16+
You can then access blog here: http://localhost:4000
17+
18+
## Using cache
19+
20+
In case you want to speed up consecutive builds, you can use Docker volumes to store Jekyll's gems locally. This can be done in like this:
21+
22+
Create a docker volume:
23+
```
24+
docker volume create jekyll-ruby-gems
25+
```
26+
Each time we want to launch our Jekyll container, run it like this:
27+
````
28+
docker run --rm -p 4000:4000 --name jekyll --volume="$PWD:/srv/jekyll" --mount source=jekyll-ruby-gems,target=/usr/local/bundle -it jekyll/jekyll:3.8 jekyll serve

0 commit comments

Comments
 (0)