blob: 5606ca805bc4261cb4c5b33f49ab4c0c3f98705a [file] [log] [blame]
Scott Bakerc87cb602016-06-01 17:49:07 -07001FROM xosproject/xos-synchronizer-openstack
2
Scott Baker9765b862016-06-01 23:04:07 -07003# Install docker-in-docker (dind). See https://hub.docker.com/_/docker/. The docker git repo
4# currently only has 1.10 and 1.11, but it's possible to get the dockerfiles for earlier
5# versions by using:
6# docker pull centurylink/dockerfile-from-image
7# alias dfimage="docker run -v /var/run/docker.sock:/var/run/docker.sock --rm centurylink/dockerfile-from-image"
8# dgimage <name of image>
9
10# This container must be started in privileged mode.
11
12RUN apt-get install -y curl iptables
13ENV DOCKER_BUCKET=get.docker.com
14ENV DOCKER_VERSION=1.8.3
15ENV DOCKER_SHA256=f024bc65c45a3778cf07213d26016075e8172de8f6e4b5702bedde06c241650f
16RUN curl -fSL "https://${DOCKER_BUCKET}/builds/Linux/x86_64/docker-$DOCKER_VERSION" -o /usr/local/bin/docker && echo "${DOCKER_SHA256} /usr/local/bin/docker" | sha256sum -c - && chmod +x /usr/local/bin/docker
Scott Baker73b0d952016-06-01 23:52:06 -070017
18# XXX uncomment the following 6 lines to run docker-in-docker
19# comment them out if using the docker socket in a volume instead
20#ENV DIND_COMMIT=3b5fac462d21ca164b3778647420016315289034
21#RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind && chmod +x /usr/local/bin/dind
22#COPY start-dockerd.sh /usr/local/bin/
23#VOLUME /var/lib/docker
24#EXPOSE 2375
25#ENTRYPOINT ["start-dockerd.sh"]
26
27# Instead of using docker-in-docker, we can just attach ourselves
28# to the docker socket via a volume in the docker-compose:
29# - /var/run/docker.sock:/var/run/docker.sock
30# This is more convenient, allowing us to build directly into our
31# parent's docker build system, making the images available for
32# instantiation on the parent.
Scott Bakerc87cb602016-06-01 17:49:07 -070033
34CMD update-ca-certificates && /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf