github.com/surajnarwade/libcompose@v0.4.1-0.20170515122242-01ff8920a578/Dockerfile (about)

     1  # This file describes the standard way to build libcompose, using docker
     2  FROM golang:1.7.5
     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.11.2 1.12.6 1.13.0
    17  ENV DEFAULT_DOCKER_VERSION 1.10.3
    18  
    19  # Download docker
    20  RUN set -e; \
    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          else \
    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          fi \
    32      done
    33  
    34  # Set the default Docker to be run
    35  RUN ln -s /usr/local/bin/docker-${DEFAULT_DOCKER_VERSION} /usr/local/bin/docker
    36  
    37  WORKDIR /go/src/github.com/docker/libcompose
    38  
    39  # Compose COMMIT for acceptance test version, update that commit when
    40  # you want to update the acceptance test version to support.
    41  ENV COMPOSE_COMMIT 1.9.0
    42  RUN virtualenv venv && \
    43      git clone https://github.com/docker/compose.git venv/compose && \
    44      cd venv/compose && \
    45      git checkout -q "$COMPOSE_COMMIT" && \
    46      ../bin/pip install \
    47                 -r requirements.txt \
    48                 -r requirements-dev.txt
    49  
    50  ENV COMPOSE_BINARY /go/src/github.com/docker/libcompose/libcompose-cli
    51  ENV USER root
    52  
    53  # Wrap all commands in the "docker-in-docker" script to allow nested containers
    54  ENTRYPOINT ["hack/dind"]
    55  
    56  COPY . /go/src/github.com/docker/libcompose