docker/Dockerfile in vx-worker-0.2.0.pre33 vs docker/Dockerfile in vx-worker-0.2.0.pre34
- old
+ new
@@ -1,15 +1,35 @@
+# ssh
+
FROM ubuntu:12.04
-# disable questions
-ENV DEBIAN_FRONTEND noninteractive
-
-# disable service autostarting
ENV RUNLEVEL 1
-# add runit helpers
-ADD ./sv-gen /usr/local/bin/sv-gen
-ADD ./sv-enable /usr/local/bin/sv-enable
+RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt precise main restricted universe" > /etc/apt/sources.list
+RUN apt-get -qy update
-# run bootstrap
-ADD ./bootstrap.sh /tmp/bootstrap.sh
-RUN /tmp/bootstrap.sh && rm /tmp/bootstrap.sh
+# add ssh
+RUN DEBIAN_FRONTEND=noninteractive RUNLEVEL=1 apt-get install -qy openssh-server
+RUN sed -i 's/start on filesystem/start on filesystem or dockerboot/' /etc/init/ssh.conf
+
+# add dbus, need for upstart jobs
+RUN DEBIAN_FRONTEND=noninteractive RUNLEVEL=1 apt-get install -qy dbus
+RUN sed -i 's/start on local-filesystems/start on local-filesystems or dockerboot/' /etc/init/dbus.conf
+
+# change /bin/mknod, need for openjdk-7-jdk => fuse
+RUN dpkg-divert --local --rename --add /sbin/mknod && ln -s /bin/true /sbin/mknod
+
+# create user
+RUN useradd -m vexor -s /bin/bash
+RUN echo "vexor:vexor" | chpasswd
+RUN apt-get -qy install sudo
+RUN echo "vexor ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers
+
+# fix 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 python and modules, needed for ansible
+RUN DEBIAN_FRONTEND=noninteractive RUNLEVEL=1 apt-get install -qy python
+
+ENTRYPOINT ["/sbin/init", "--startup-event", "dockerboot"]