Skip to content

Fix the Docker setup #2622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 ##
Expand Down
10 changes: 6 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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