github.com/skippbox/kompose-origin@v0.0.0-20160524133224-16a9dca7bac2/Dockerfile (about)

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