github.com/amrnt/deis@v1.3.1/builder/image/Dockerfile (about) 1 FROM ubuntu-debootstrap:14.04 2 3 ENV DEBIAN_FRONTEND noninteractive 4 5 # install common packages 6 RUN apt-get update && apt-get install -y curl net-tools sudo 7 8 # install etcdctl 9 RUN curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \ 10 && chmod +x /usr/local/bin/etcdctl 11 12 # install confd 13 RUN curl -sSL -o /usr/local/bin/confd https://s3-us-west-2.amazonaws.com/opdemand/confd-v0.5.0-json \ 14 && chmod +x /usr/local/bin/confd 15 16 # install docker-in-docker 17 RUN echo "deb http://get.docker.io/ubuntu docker main" > /etc/apt/sources.list.d/docker.list 18 RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 19 20 # install builder, docker, and hook dependencies 21 RUN apt-get update && apt-get install -yq \ 22 openssh-server git \ 23 aufs-tools iptables lxc \ 24 lxc-docker-1.3.3 25 26 # configure ssh server 27 RUN rm /etc/ssh/ssh_host_* 28 RUN dpkg-reconfigure openssh-server 29 RUN mkdir -p /var/run/sshd 30 31 # configure locale 32 RUN echo LANG="en_US.UTF-8" > /etc/default/locale && dpkg-reconfigure locales 33 34 # install git and configure gituser 35 ENV GITHOME /home/git 36 ENV GITUSER git 37 RUN useradd -d $GITHOME $GITUSER 38 RUN mkdir -p $GITHOME/.ssh && chown git:git $GITHOME/.ssh 39 RUN chown -R $GITUSER:$GITUSER $GITHOME 40 41 # HACK: import progrium/cedarish as a tarball 42 # see https://github.com/deis/deis/issues/1027 43 RUN curl -#SL -o /progrium_cedarish.tar.gz \ 44 https://s3-us-west-2.amazonaws.com/opdemand/progrium_cedarish_2014_12_15.tar.gz 45 46 # define the execution environment 47 # use VOLUME to remove /var/lib/docker from copy-on-write for performance 48 # we don't want to stack overlay filesystems 49 VOLUME /var/lib/docker 50 WORKDIR /app 51 ENTRYPOINT ["/app/bin/entry"] 52 CMD ["/app/bin/boot"] 53 EXPOSE 22 54 RUN addgroup --quiet --gid 2000 slug && useradd slug --uid=2000 --gid=2000 55 56 # $GITUSER is added to docker group to use docker without sudo and to slug 57 # group in order to share resources with the slug user 58 RUN usermod -a -G docker $GITUSER 59 RUN usermod -a -G slug $GITUSER 60 61 ADD templates/shim.dockerfile /home/git/ 62 ADD etc /etc 63 ADD . /app 64 RUN chown -R root:root /app 65 66 ENV DEIS_RELEASE 1.3.1