blob: b86cbb16bf5cf5ce64d33b61095ce7cbd9765416 [file] [log] [blame]
Scott Baker4f7ff0f2016-06-01 17:49:07 -07001FROM xosproject/xos-synchronizer-openstack
2
Scott Baker77a64142016-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
Scott Baker69c53e92016-06-09 22:00:33 -070012RUN apt-get install -y curl
Scott Baker640c0322016-06-01 23:52:06 -070013
Scott Baker1c5ba0e2016-06-14 01:07:54 -070014# XXX version 1.10.3
15ENV DOCKER_BUCKET get.docker.com
16ENV DOCKER_VERSION 1.10.3
17ENV DOCKER_SHA256 d0df512afa109006a450f41873634951e19ddabf8c7bd419caeb5a526032d86d
18RUN 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
19
20# XXX vserioin 1.8.3
21#ENV DOCKER_BUCKET=get.docker.com
22#ENV DOCKER_VERSION=1.8.3
23#ENV DOCKER_SHA256=f024bc65c45a3778cf07213d26016075e8172de8f6e4b5702bedde06c241650f
24#RUN 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
25
26# XXX version 1.8.3
Scott Baker640c0322016-06-01 23:52:06 -070027# XXX uncomment the following 6 lines to run docker-in-docker
28# comment them out if using the docker socket in a volume instead
29#ENV DIND_COMMIT=3b5fac462d21ca164b3778647420016315289034
30#RUN wget "https://raw.githubusercontent.com/docker/docker/${DIND_COMMIT}/hack/dind" -O /usr/local/bin/dind && chmod +x /usr/local/bin/dind
31#COPY start-dockerd.sh /usr/local/bin/
32#VOLUME /var/lib/docker
33#EXPOSE 2375
34#ENTRYPOINT ["start-dockerd.sh"]
35
36# Instead of using docker-in-docker, we can just attach ourselves
37# to the docker socket via a volume in the docker-compose:
38# - /var/run/docker.sock:/var/run/docker.sock
39# This is more convenient, allowing us to build directly into our
40# parent's docker build system, making the images available for
41# instantiation on the parent.
Scott Baker4f7ff0f2016-06-01 17:49:07 -070042
Scott Baker37204e52016-06-07 10:24:44 -070043# Now install docker-compose
44
45RUN bash -c "curl -L https://github.com/docker/compose/releases/download/1.5.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose"
46RUN chmod +x /usr/local/bin/docker-compose
47
Scott Baker4f7ff0f2016-06-01 17:49:07 -070048CMD update-ca-certificates && /usr/bin/supervisord -c /etc/supervisor/conf.d/synchronizer.conf