-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Running into a Docker container #150
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM ruby:2.1 | ||
|
||
MAINTAINER Maxence POUTORD <[email protected]> | ||
|
||
RUN apt-get update | ||
|
||
# Install bundle of gems | ||
WORKDIR /tmp | ||
COPY Gemfile /tmp/ | ||
RUN bundle install | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In a container, I don't believe that /tmp will get wiped since the container never technically shuts down. You should clean up /tmp explicitly once you are done running a bundle install. |
||
|
||
# Copy site into | ||
VOLUME /site | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. using a volume is unnecessary if you are copying files in. The volume is nice from a live reload perspective, but the copy is nicer for hosting options if someone wants to throw the container up on an Azure App Service or something. I'm not against setting up a volume AND copying, but I think this could be handled more gracefully (perhaps 2 dockerfiles?). |
||
WORKDIR /site | ||
COPY . /site | ||
|
||
EXPOSE 4000 | ||
|
||
ENTRYPOINT ["jekyll", "serve"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doing a dist-upgrade is also recommended