-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup Docker for Local Development Environment (#125)
- Loading branch information
1 parent
782a250
commit 5e5bde5
Showing
2 changed files
with
30 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,14 @@ | ||
# https://hub.docker.com/_/ruby | ||
FROM ruby:3.0 | ||
|
||
# throw errors if Gemfile has been modified since Gemfile.lock | ||
RUN bundle config --global frozen 1 | ||
|
||
WORKDIR /usr/src/app | ||
|
||
# copy gems first to cache bundle install | ||
COPY Gemfile Gemfile.lock ./ | ||
RUN bundle install | ||
|
||
# copy whole repo into the image | ||
COPY . . |
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,16 @@ | ||
version: '3' | ||
services: | ||
jekyll: | ||
container_name: jekyll-server | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: merl-center:v1 | ||
# host flag allows Jekyll server to be accessed from outside the container | ||
command: bundle exec jekyll serve --livereload --host=0.0.0.0 | ||
# volume allows changes to be seen on localhost immediately instead of having to delete and rebuild image | ||
volumes: | ||
- .:/usr/src/app | ||
ports: | ||
- 4000:4000 | ||
- 35729:35729 # port for livereload |