Skip to content

Fix Docker setup #1239

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
May 10, 2021
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
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM ruby:2.5

RUN gem install bundler jekyll

WORKDIR /srv/jekyll

COPY Gemfile .
COPY Gemfile.lock .

RUN bundle install
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,20 @@ Markdown.

## Building the site
Make sure you are in the root directory of the cloned repository.
### For Compose:
### With `docker-compose`:
```
bin/serve
docker-compose up
```

### For Bundler:
When the website dependencies change (the content of the `Gemfile`),
you have to re-build the Docker image:

```
docker-compose up --build
```

### With Bundler:

```
bundle install
bundle exec jekyll serve --incremental
Expand Down
3 changes: 0 additions & 3 deletions bin/bundle

This file was deleted.

3 changes: 0 additions & 3 deletions bin/jekyll

This file was deleted.

3 changes: 0 additions & 3 deletions bin/serve

This file was deleted.

11 changes: 4 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
version: "2"
services:
scala-lang:
image: jekyll/jekyll:latest
volumes:
- $PWD:/srv/jekyll
- $PWD/vendor/bundle:/usr/local/bundle
build: .
command: bundle exec jekyll serve --incremental --host=0.0.0.0
ports:
- 4000:4000
- 35729:35729
- 3000:3000
- 80:4000
volumes:
- .:/srv/jekyll