Skip to content
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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ permalink: /en/2016/01/01/short-title

This website is based on [Jekyll](https://jekyllrb.com/). To build
locally, [install Ruby 3.1.2](https://gorails.com/setup) using system
packages, [rvm](https://rvm.io), [rbenv](https://github.com/rbenv/rbenv), or another method.
packages, [rvm](https://rvm.io), [rbenv](https://github.com/rbenv/rbenv), or another method. An
alternative is to use Docker, for which instructions are available [here](./contrib/devtools/).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
alternative is to use Docker, for which instructions are available [here](./contrib/devtools/).
alternative is to use Docker, for which instructions are available [here](./contrib/devtools#Dockerfile).

Then clone this repository and change directory into it:

git clone https://github.com/bitcoin-core/bitcoincore.org.git
Expand Down
17 changes: 17 additions & 0 deletions contrib/devtools/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM ruby:3.1.2

ENV NOKOGIRI_USE_SYSTEM_LIBRARIES=true
ENV JEKYLL_ENV=production
ENV RUBYOPT="-KU -E utf-8:utf-8"

WORKDIR /site

COPY Gemfile* .

RUN gem install bundler \
&& bundle install

# Default Jekyll port
EXPOSE 4000

CMD ["bundle", "exec", "jekyll", "serve", "--future", "--drafts", "--unpublished", "--incremental", "--strict_front_matter", "--host", "0.0.0.0"]
17 changes: 17 additions & 0 deletions contrib/devtools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,20 @@ gribble (18)
| luke-jr | [Luke Dashjr][] |
[...]
```

Dockerfile
==========

Run the website locally without having to install the dependencies on your machine.

To build the image (from the root of the repository):
```
docker build -f ./contrib/devtools/Dockerfile -t corewebsite .
```

Then the container can be run like so:
```
docker run -it --rm -v "$PWD":/site -p 4000:4000 corewebsite
```

And the website can be accessed at https://localhost:4000.