docker/Dockerfile in evrone-ci-worker-0.2.0.pre1 vs docker/Dockerfile in evrone-ci-worker-0.2.0.pre3
- old
+ new
@@ -4,58 +4,14 @@
ENV DEBIAN_FRONTEND noninteractive
# disable service autostarting
ENV RUNLEVEL 1
-# replace init
-RUN dpkg-divert --local --rename --add /sbin/initctl
-RUN ln -s /bin/true /sbin/initctl
-
-RUN apt-get -qy update
-RUN apt-get install -qy curl git-core build-essential
-
-# add evrone repo
-RUN mkdir -p /etc/apt/sources.list.d
-RUN echo "deb http://download.opensuse.org/repositories/home:/dmexe/xUbuntu_12.04/ ./" > /etc/apt/sources.list.d/Evrone.list
-RUN curl http://download.opensuse.org/repositories/home:/dmexe/xUbuntu_12.04/Release.key | apt-key add -
-RUN apt-get -qy update
-
-# install runit
-RUN chmod 0000 /sbin/start
-RUN apt-get -qy install runit
-RUN chmod 0755 /sbin/start
+# add runit helpers
ADD ./sv-gen /usr/local/bin/sv-gen
ADD ./sv-enable /usr/local/bin/sv-enable
-# set user password
-RUN useradd -m ci
-RUN echo "ci:ci" | chpasswd
-RUN apt-get -qy install sudo
-RUN echo "ci ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
-
-# fixes locales
-RUN locale-gen en_US.UTF-8
-RUN dpkg-reconfigure -fnoninteractive locales
-RUN update-locale LC_ALL="en_US.UTF-8" LANG="en_US.UTF-8" LANGUAGE="en_US"
-
-# install ssh
-RUN apt-get install -qy openssh-server
-RUN mkdir -p /var/run/sshd
-RUN sv-gen ssh "/usr/sbin/sshd -D -e"
-
-# install postgresql
-RUN apt-get install -qy postgresql
-RUN echo "host all all all trust" > /etc/postgresql/9.1/main/pg_hba.conf
-RUN sv-gen postgresql "/usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf" postgres
-
-# add ruby
-RUN apt-get install -qy rbenv rbenv-2.0.0-p195 rbenv-1.9.3-p448
-RUN env RBENV_VERSION=2.0.0-p195 rbenv exec gem install bundler --no-ri --no-rdoc
-RUN env RBENV_VERSION=1.9.3-p448 rbenv exec gem install bundler --no-ri --no-rdoc
-RUN rbenv rehash
-
-RUN apt-get -qy clean autoremove
-
-RUN sv-enable postgresql
-RUN sv-enable ssh
+# run bootstrap
+ADD ./bootstrap.sh /tmp/bootstrap.sh
+RUN /tmp/bootstrap.sh && rm /tmp/bootstrap.sh
ENTRYPOINT ["/usr/bin/runsvdir", "-P", "/etc/service"]