Skip to content

Commit 6d9488e

Browse files
committed
Fix Docker setup
1 parent 6f404f4 commit 6d9488e

File tree

6 files changed

+25
-19
lines changed

6 files changed

+25
-19
lines changed

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM ruby:2.5
2+
3+
RUN gem install bundler jekyll
4+
5+
WORKDIR /srv/jekyll
6+
7+
COPY Gemfile .
8+
COPY Gemfile.lock .
9+
10+
RUN bundle install

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,20 @@ Markdown.
1717

1818
## Building the site
1919
Make sure you are in the root directory of the cloned repository.
20-
### For Compose:
20+
### With `docker-compose`:
2121
```
22-
bin/serve
22+
docker-compose up
2323
```
2424

25-
### For Bundler:
25+
When the website dependencies change (the content of the `Gemfile`),
26+
you have to re-build the Docker image:
27+
28+
```
29+
docker-compose up --build
30+
```
31+
32+
### With Bundler:
33+
2634
```
2735
bundle install
2836
bundle exec jekyll serve --incremental

bin/bundle

Lines changed: 0 additions & 3 deletions
This file was deleted.

bin/jekyll

Lines changed: 0 additions & 3 deletions
This file was deleted.

bin/serve

Lines changed: 0 additions & 3 deletions
This file was deleted.

docker-compose.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
version: "2"
22
services:
33
scala-lang:
4-
image: jekyll/jekyll:latest
5-
volumes:
6-
- $PWD:/srv/jekyll
7-
- $PWD/vendor/bundle:/usr/local/bundle
4+
build: .
5+
command: bundle exec jekyll serve --incremental --host=0.0.0.0
86
ports:
97
- 4000:4000
10-
- 35729:35729
11-
- 3000:3000
12-
- 80:4000
8+
volumes:
9+
- .:/srv/jekyll

0 commit comments

Comments
 (0)