Skip to content

Commit 7ca378b

Browse files
committed
Updates README with Docker build instructions
1 parent ce806d1 commit 7ca378b

File tree

1 file changed

+29
-13
lines changed

1 file changed

+29
-13
lines changed

README.md

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,44 @@ zlib1g-dev
1212
```
1313

1414
We recommend installing gems to a (hidden) directory in your home folder:
15-
```bash
16-
echo '' >> ~/.bashrc
17-
echo '# Install Ruby Gems to ~/.gems' >> ~/.bashrc
18-
echo 'export GEM_HOME="$HOME/.gems"' >> ~/.bashrc
19-
echo 'export PATH="$HOME/.gems/bin:$PATH"' >> ~/.bashrc
20-
echo '' >> ~/.bashrc
21-
source ~/.bashrc
15+
```sh-session
16+
$ echo '' >> ~/.bashrc
17+
$ echo '# Install Ruby Gems to ~/.gems' >> ~/.bashrc
18+
$ echo 'export GEM_HOME="$HOME/.gems"' >> ~/.bashrc
19+
$ echo 'export PATH="$HOME/.gems/bin:$PATH"' >> ~/.bashrc
20+
$ echo '' >> ~/.bashrc
21+
$ source ~/.bashrc
2222
```
2323

2424
Install jekyll and bundler:
25-
```bash
26-
gem install jekyll bundler
25+
```sh-session
26+
$ gem install jekyll bundler
2727
```
2828

2929
Install gems:
30-
```bash
31-
bundle install
30+
```sh-session
31+
$ bundle install
3232
```
3333

3434
Build and serve locally with:
35-
```bash
36-
bundle exec jekyll serve --host 0.0.0.0
35+
```sh-session
36+
$ bundle exec jekyll serve --host 0.0.0.0
3737
```
3838

3939
The site should now be available at http://0.0.0.0:4000/ on your local machine, and your local machine's IP address on your network—great for testing on mobile OSes.
40+
41+
### Alternative: building with Docker
42+
43+
You'll need Docker installed on your system.
44+
45+
Build the Docker image:
46+
```sh-session
47+
$ bin/build-container
48+
```
49+
50+
Build and serve locally with:
51+
```sh-session
52+
$ bin/serve
53+
```
54+
55+
The site should now be available at http://0.0.0.0:4000/

0 commit comments

Comments
 (0)