Skip to content

Commit fd26923

Browse files
authored
Merge pull request #2622 from scalacenter/fix-docker-setup
Fix the Docker setup
2 parents 10fef49 + 37390e5 commit fd26923

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
FROM ruby:2.6
1+
FROM ruby:2.6.9
22

3-
RUN gem install bundler jekyll
3+
RUN gem install rouge -v3.30.0
4+
RUN gem install bundler:2.3.10 jekyll
45

56
WORKDIR /srv/jekyll
67

78
COPY Gemfile .
89
COPY Gemfile.lock .
910

11+
RUN echo -n "bundle version: " && bundle --version
12+
RUN chmod u+s /bin/chown
1013
RUN bundle install
11-

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@ For more details, read on.
1919

2020
To build and view site with Docker:
2121

22-
docker-compose up
22+
env UID="$(id -u)" GID="$(id -g)" docker-compose up
2323

2424
It will incrementally build and serve site at `http://localhost:4000`.
2525

26+
In case the Dockerfile changed, re-build it with:
27+
28+
env UID="$(id -u)" GID="$(id -g)" docker-compose up --build
29+
2630
For more details on the Docker option, see [this issue](https://github.com/scala/docs.scala-lang/issues/1286).
2731

2832
## Contributing ##

docker-compose.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
version: "2"
1+
version: '2'
2+
23
services:
3-
scala-lang:
4+
jekyll:
5+
user: "${UID}:${GID}"
46
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 "
68
ports:
7-
- 4000:4000
9+
- '4000:4000'
810
volumes:
911
- .:/srv/jekyll

0 commit comments

Comments
 (0)