File tree Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Expand file tree Collapse file tree 3 files changed +18
-14
lines changed Original file line number Diff line number Diff line change 1
- FROM ruby:2.6
1
+ FROM ruby:2.6.9
2
2
3
- RUN gem install bundler jekyll
3
+ RUN gem install rouge -v3.30.0
4
+ RUN gem install bundler:2.3.10 jekyll
4
5
5
6
WORKDIR /srv/jekyll
6
7
7
8
COPY Gemfile .
8
9
COPY Gemfile.lock .
9
10
11
+ RUN chmod u+s /bin/chown
10
12
RUN bundle install
Original file line number Diff line number Diff line change @@ -18,16 +18,16 @@ Markdown.
18
18
## Building the site
19
19
Make sure you are in the root directory of the cloned repository.
20
20
### With ` docker-compose ` :
21
- ```
22
- docker-compose up
23
- ```
24
21
25
- When the website dependencies change (the content of the ` Gemfile ` ),
26
- you have to re-build the Docker image:
22
+ To build and view site with Docker:
27
23
28
- ```
29
- docker-compose up --build
30
- ```
24
+ env UID="$(id -u)" GID="$(id -g)" docker-compose up
25
+
26
+ It will incrementally build and serve site at ` http://localhost:4000 ` .
27
+
28
+ In case the Dockerfile changed, re-build it with:
29
+
30
+ env UID="$(id -u)" GID="$(id -g)" docker-compose up --build
31
31
32
32
### With Bundler:
33
33
Original file line number Diff line number Diff line change 1
- version : " 2"
1
+ version : ' 2'
2
+
2
3
services :
3
- scala-lang :
4
+ jekyll :
5
+ user : " ${UID}:${GID}"
4
6
build : .
5
- command : bundle exec jekyll serve --incremental --host=0.0.0.0
7
+ command : sh -c "chown $UID / && bundle exec jekyll serve --incremental --host=0.0.0.0 "
6
8
ports :
7
- - 4000:4000
9
+ - ' 4000:4000'
8
10
volumes :
9
11
- .:/srv/jekyll
You can’t perform that action at this time.
0 commit comments