-
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?
Conversation
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.
I like the idea of being able to grab this repo and run the code without worrying about having the dependencies on your machine.
# 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 comment
The 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.
|
||
MAINTAINER Maxence POUTORD <[email protected]> | ||
|
||
RUN apt-get update |
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
RUN bundle install | ||
|
||
# Copy site into | ||
VOLUME /site |
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.
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?).
facebook sharing image meta tag added related mmistakes#149 issue
No description provided.