title: How to use Dockerfile in Gitlab CI
body: <p>Using gitlab-ci for my node/react app, I'm trying to use <code>phusion/passenger-nodejs</code> as the base docker image</p>
  
  <p>I can specify this easily in .gitlab-ci.yml: </p>
  
  <pre><code>image: phusion/passenger-nodejs:latest
  
  variables:
    HOME: /root
  
  cache:
    paths:
    - node_modules/
  
  stages:
    - build
    - test
    - deploy
  
  set_environment:
    stage: build
    script:
      - npm install
    tags:
    - docker
  
  test_node:
    stage: test
    script:
      - npm install
      - npm test
    tags:
      - docker
  </code></pre>
  
  <p>However, Phusion Passenger expects you to make configuration changes, e.g. python support, using their special init process, etc. in the Dockerfile.</p>
  
  <pre><code>#FROM phusion/passenger-ruby24:&lt;VERSION&gt;
  #FROM phusion/passenger-jruby91:&lt;VERSION&gt;
  FROM phusion/passenger-nodejs:&lt;VERSION&gt;
  #FROM phusion/passenger-customizable:&lt;VERSION&gt;
  
  # Set correct environment variables.
  ENV HOME /root
  
  # Use baseimage-docker's init process.
  CMD ["/sbin/my_init"]
  
  # If you're using the 'customizable' variant, you need to explicitly opt-in
  # for features. 
  #
  # N.B. these images are based on https://github.com/phusion/baseimage-docker, 
  # so anything it provides is also automatically on board in the images below 
  # (e.g. older versions of Ruby, Node, Python).  
  # 
  # Uncomment the features you want:
  #
  #   Ruby support
  #RUN /pd_build/ruby-2.0.*.sh
  #RUN /pd_build/ruby-2.1.*.sh
  #RUN /pd_build/ruby-2.2.*.sh
  #RUN /pd_build/ruby-2.3.*.sh
  #RUN /pd_build/ruby-2.4.*.sh
  #RUN /pd_build/jruby-9.1.*.sh
  #   Python support.
  RUN /pd_build/python.sh
  #   Node.js and Meteor standalone support.
  #   (not needed if you already have the above Ruby support)
  RUN /pd_build/nodejs.sh
  
  # ...put your own build instructions here...
  
  # Clean up APT when done.
  RUN apt-get clean &amp;&amp; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
  </code></pre>
  
  <p>Is there a way to use a Dockerfile with gitlab-ci? Is there a good work around other than <code>apt-get install</code> and adding shell scripts?</p>