diff --git a/Dockerfile b/Dockerfile index 2fe3d70737..d8908e57d7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,13 @@ -FROM ruby:2.6 +FROM ruby:2.6.9 -RUN gem install bundler jekyll +RUN gem install rouge -v3.30.0 +RUN gem install bundler:2.3.10 jekyll WORKDIR /srv/jekyll COPY Gemfile . COPY Gemfile.lock . +RUN echo -n "bundle version: " && bundle --version +RUN chmod u+s /bin/chown RUN bundle install - diff --git a/README.md b/README.md index fe377e9f6b..c0d4cbfe66 100644 --- a/README.md +++ b/README.md @@ -19,10 +19,14 @@ For more details, read on. To build and view site with Docker: - docker-compose up + env UID="$(id -u)" GID="$(id -g)" docker-compose up It will incrementally build and serve site at `http://localhost:4000`. +In case the Dockerfile changed, re-build it with: + + env UID="$(id -u)" GID="$(id -g)" docker-compose up --build + For more details on the Docker option, see [this issue](https://github.com/scala/docs.scala-lang/issues/1286). ## Contributing ## diff --git a/docker-compose.yml b/docker-compose.yml index bfc376a362..98cd0dda02 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,11 @@ -version: "2" +version: '2' + services: - scala-lang: + jekyll: + user: "${UID}:${GID}" build: . - command: bundle exec jekyll serve --incremental --host=0.0.0.0 + command: sh -c "chown $UID / && bundle exec jekyll serve --incremental --host=0.0.0.0 " ports: - - 4000:4000 + - '4000:4000' volumes: - .:/srv/jekyll