FROM ubuntu:12.04 MAINTAINER Sytse Sijbrandij # Setup a production GitLab container # with the official GitLab cookbook # https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md # Build with: sudo docker build -t gitlab . EXPOSE 22 EXPOSE 80 RUN apt-get -y update RUN apt-get -y install curl build-essential libxml2-dev libxslt-dev git # Suppress Upstart and init.d errors # http://lalyos.github.io/blog/2013/10/01/fixing-startup-on-docker/ RUN dpkg-divert --local --rename --add /sbin/initctl RUN ln -s /bin/true /sbin/initctl # Thanks to Paul Czarkowski "paul@paulcz.net" for # http://tech.paulcz.net/2013/09/creating-immutable-servers-with-chef-and-docker-dot-io.html ADD https://www.opscode.com/chef/install.sh install.sh RUN bash ./install.sh -v 11.4.4 RUN echo "gem: --no-ri --no-rdoc" > ~/.gemrc RUN /opt/chef/embedded/bin/gem install berkshelf # Reuse the solo.json from the cookbook, customize this to change settings ADD https://gitlab.com/gitlab-org/cookbook-gitlab/raw/master/solo.json.production_example /chef/solo.json # Copy solo.rb, Berksfile, etc. ADD . /chef RUN cd /chef && /opt/chef/embedded/bin/berks install --path /chef/cookbooks RUN apt-get install -y postgresql postgresql-contrib libpq-dev # TODO With this still can't install the pg gem, also see https://github.com/cloudfoundry/bosh-lite/issues/22 RUN chef-solo -c /chef/solo.rb -j /chef/solo.json # TODO start all the services with a script (gitlab, redis, postgresql, nginx)