Skip to content

Dockerfile Spiegbriefje

Dockerfile biedt de instructies die nodig zijn om een container te bouwen en de commando’s die moeten worden uitgevoerd wanneer de container draait.

Overerving (Inheritance)

FROM ruby:2.2.2

Variabelen

ENV APP_HOME /myapp
RUN mkdir $APP_HOME

Initialisatie

RUN bundle install
WORKDIR /myapp

Onbuild

ONBUILD RUN bundle install
# when used with another file

Commando’s

EXPOSE 5900
CMD    ["bundle", "exec", "rails", "server"]