Skip to content
This repository has been archived by the owner on Aug 28, 2019. It is now read-only.

Running into a Docker container #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Running into a Docker container #150

wants to merge 1 commit into from

Conversation

maxpou
Copy link

@maxpou maxpou commented May 19, 2016

No description provided.

@maxpou maxpou changed the title Running into a Docker container 🐳 Running into a Docker container May 19, 2016
Copy link

@justin-vanwinkle justin-vanwinkle left a 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

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

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

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?).

misterwell pushed a commit to misterwell/misterwell.github.io that referenced this pull request Jan 17, 2019
facebook sharing image meta tag added related mmistakes#149 issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants