generated from just-the-docs/just-the-docs-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from unboxed/docker-setup
Add initial Docker setup
- Loading branch information
Showing
3 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Use an official Ruby image as a parent image | ||
FROM ruby:latest | ||
|
||
# Optionally set a working directory | ||
WORKDIR /usr/src/app | ||
|
||
# Copy the Gemfile and Gemfile.lock into the container | ||
COPY Gemfile Gemfile.lock ./ | ||
|
||
# Install bundler for the current Ruby version, configure to install all platforms, and install dependencies | ||
RUN gem install bundler && bundle config set --local force_ruby_platform true && bundle install | ||
|
||
# Copy the rest of your application into the container | ||
COPY . . | ||
|
||
# Make port 4000 available to the world outside this container | ||
EXPOSE 4000 | ||
|
||
# Run jekyll serve when the container launches | ||
CMD ["bundle", "exec", "jekyll", "serve", "--host=0.0.0.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: '3' | ||
services: | ||
jekyll: | ||
build: . | ||
image: my-jekyll-site | ||
command: bundle exec jekyll serve --host 0.0.0.0 --livereload --force_polling --incremental | ||
volumes: | ||
- .:/usr/src/app | ||
ports: | ||
- "4000:4000" |