File tree 1 file changed +15
-3
lines changed
1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,25 @@ Start writing posts quickly with docker
4
4
```
5
5
git clone https://github.com/wearearima/wearearima.github.io.git
6
6
$ 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
8
8
```
9
9
10
10
To see content in __ draft_ folder
11
11
```
12
12
$ git clone https://github.com/wearearima/wearearima.github.io.git
13
13
$ 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
15
15
```
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
You can’t perform that action at this time.
0 commit comments