Skip to content

Instantly share code, notes, and snippets.

@mikekunze
Created January 19, 2014 18:22
Show Gist options
  • Save mikekunze/8508816 to your computer and use it in GitHub Desktop.
Save mikekunze/8508816 to your computer and use it in GitHub Desktop.
This creates a gitlab server
# From ubuntu 12.04
FROM ubuntu:latest
RUN echo "#!/bin/sh\nexit 101" > /usr/sbin/policy-rc.d; chmod +x /usr/sbin/policy-rc.d;\
dpkg-divert --local --rename --add /sbin/initctl;\
ln -s /bin/true /sbin/initctl
ADD ./init.sh /tmp/init.sh
RUN /bin/bash /tmp/init.sh && rm /tmp/init.sh
ADD ./gitlab-shell-config.yml /home/git/gitlab-shell/config.yml
ADD ./install-gitlab.sh /tmp/install-gitlab.sh
RUN /bin/bash /tmp/install-gitlab.sh && rm /tmp/install-gitlab.sh
ADD ./gitlabhq-config.yml /home/git/gitlab/config/gitlab.yml
ADD ./database.yml /home/git/gitlab/config/database.yml
ADD ./resque.yml /home/git/gitlab/config/resque.yml
ADD ./install-gitlab-finish.sh /tmp/tmp.sh
RUN /bin/bash /tmp/tmp.sh && rm /tmp/tmp.sh
ADD ./supervisord.conf /etc/supervisor/conf.d/
# Setting root password to admin
RUN echo "root:admin" | chpasswd
RUN mkdir /var/run/sshd
EXPOSE 8080
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment