Skip to content

Commit

Permalink
Updates README with Docker build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanprior committed Apr 5, 2020
1 parent ce806d1 commit 7ca378b
Showing 1 changed file with 29 additions and 13 deletions.
42 changes: 29 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,44 @@ zlib1g-dev
```

We recommend installing gems to a (hidden) directory in your home folder:
```bash
echo '' >> ~/.bashrc
echo '# Install Ruby Gems to ~/.gems' >> ~/.bashrc
echo 'export GEM_HOME="$HOME/.gems"' >> ~/.bashrc
echo 'export PATH="$HOME/.gems/bin:$PATH"' >> ~/.bashrc
echo '' >> ~/.bashrc
source ~/.bashrc
```sh-session
$ echo '' >> ~/.bashrc
$ echo '# Install Ruby Gems to ~/.gems' >> ~/.bashrc
$ echo 'export GEM_HOME="$HOME/.gems"' >> ~/.bashrc
$ echo 'export PATH="$HOME/.gems/bin:$PATH"' >> ~/.bashrc
$ echo '' >> ~/.bashrc
$ source ~/.bashrc
```

Install jekyll and bundler:
```bash
gem install jekyll bundler
```sh-session
$ gem install jekyll bundler
```

Install gems:
```bash
bundle install
```sh-session
$ bundle install
```

Build and serve locally with:
```bash
bundle exec jekyll serve --host 0.0.0.0
```sh-session
$ bundle exec jekyll serve --host 0.0.0.0
```

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.

### Alternative: building with Docker

You'll need Docker installed on your system.

Build the Docker image:
```sh-session
$ bin/build-container
```

Build and serve locally with:
```sh-session
$ bin/serve
```

The site should now be available at http://0.0.0.0:4000/

0 comments on commit 7ca378b

Please sign in to comment.