github.com/camronlevanger/libcompose@v0.4.1-0.20180423130544-6bb86d53fa21/Dockerfile (about) 1 # This file describes the standard way to build libcompose, using docker 2 FROM golang:1.8.3 3 4 # virtualenv is necessary to run acceptance tests 5 RUN apt-get update && \ 6 apt-get install -y iptables build-essential --no-install-recommends && \ 7 apt-get install -y python-setuptools && \ 8 easy_install pip && pip install virtualenv 9 10 # Install build dependencies 11 RUN go get github.com/aktau/github-release && \ 12 go get golang.org/x/tools/cmd/cover && \ 13 go get github.com/golang/lint/golint 14 15 # Which docker version to test on and what default one to use 16 ENV DOCKER_VERSIONS 1.9.1 1.10.3 1.13.1 17.03.2 17.06.0 17 ENV DEFAULT_DOCKER_VERSION 17.03.2 18 19 # Download docker 20 RUN set -e; set -x; \ 21 for v in $(echo ${DOCKER_VERSIONS} | cut -f1); do \ 22 if test "${v}" = "1.9.1" || test "${v}" = "1.10.3"; then \ 23 mkdir -p /usr/local/bin/docker-${v}/; \ 24 curl https://get.docker.com/builds/Linux/x86_64/docker-${v} -o /usr/local/bin/docker-${v}/docker; \ 25 chmod +x /usr/local/bin/docker-${v}/docker; \ 26 elif test "${v}" = "1.13.1"; then \ 27 curl https://get.docker.com/builds/Linux/x86_64/docker-${v}.tgz -o docker-${v}.tgz; \ 28 tar xzf docker-${v}.tgz -C /usr/local/bin/; \ 29 mv /usr/local/bin/docker /usr/local/bin/docker-${v}; \ 30 rm docker-${v}.tgz; \ 31 else \ 32 curl https://download.docker.com/linux/static/stable/x86_64/docker-${v}-ce.tgz -o docker-${v}.tgz; \ 33 tar xzf docker-${v}.tgz -C /usr/local/bin/; \ 34 mv /usr/local/bin/docker /usr/local/bin/docker-${v}; \ 35 rm docker-${v}.tgz; \ 36 fi \ 37 done 38 39 # Set the default Docker to be run 40 RUN ln -s /usr/local/bin/docker-${DEFAULT_DOCKER_VERSION} /usr/local/bin/docker 41 42 WORKDIR /go/src/github.com/docker/libcompose 43 44 # Compose COMMIT for acceptance test version, update that commit when 45 # you want to update the acceptance test version to support. 46 ENV COMPOSE_COMMIT 1.9.0 47 RUN virtualenv venv && \ 48 git clone https://github.com/docker/compose.git venv/compose && \ 49 cd venv/compose && \ 50 git checkout -q "$COMPOSE_COMMIT" && \ 51 ../bin/pip install \ 52 -r requirements.txt \ 53 -r requirements-dev.txt 54 55 ENV COMPOSE_BINARY /go/src/github.com/docker/libcompose/libcompose-cli 56 ENV USER root 57 58 # Wrap all commands in the "docker-in-docker" script to allow nested containers 59 ENTRYPOINT ["hack/dind"] 60 61 COPY . /go/src/github.com/docker/libcompose