diff --git a/1.12/Dockerfile b/1.12/Dockerfile deleted file mode 100644 index 61a9783..0000000 --- a/1.12/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=1.12 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.8.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/1.13/Dockerfile b/1.13/Dockerfile deleted file mode 100644 index 24941d8..0000000 --- a/1.13/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=1.13 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.10.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/1.13/docker-compose.test.yml b/1.13/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/1.13/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/17.03/Dockerfile b/17.03/Dockerfile deleted file mode 100644 index eb4b367..0000000 --- a/17.03/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=17.03 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.11.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/17.03/docker-compose.test.yml b/17.03/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/17.03/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/17.06/Dockerfile b/17.06/Dockerfile deleted file mode 100644 index 3f19f7d..0000000 --- a/17.06/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=17.06 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.15.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/17.06/docker-compose.test.yml b/17.06/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/17.06/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/17.09/Dockerfile b/17.09/Dockerfile deleted file mode 100644 index 6ea2147..0000000 --- a/17.09/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=17.09 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.16.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/17.09/docker-compose.test.yml b/17.09/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/17.09/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/17.12/Dockerfile b/17.12/Dockerfile deleted file mode 100644 index 397eded..0000000 --- a/17.12/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=17.12 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.18.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/17.12/docker-compose.test.yml b/17.12/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/17.12/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/17/Dockerfile b/17/Dockerfile deleted file mode 100644 index af07e4b..0000000 --- a/17/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=17 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.18.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/17/docker-compose.test.yml b/17/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/17/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/18.02/Dockerfile b/18.02/Dockerfile deleted file mode 100644 index d75ac38..0000000 --- a/18.02/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=18.02 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.19.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/18.02/docker-compose.test.yml b/18.02/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/18.02/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/18/Dockerfile b/18/Dockerfile deleted file mode 100644 index db02c87..0000000 --- a/18/Dockerfile +++ /dev/null @@ -1,17 +0,0 @@ -ARG DOCKER_VERSION=18 -FROM docker:${DOCKER_VERSION} - -ARG COMPOSE_VERSION=1.19.* -ARG DOCKER_VERSION - -RUN apk add --no-cache py-pip -RUN pip install "docker-compose${COMPOSE_VERSION:+==}${COMPOSE_VERSION}" - -LABEL \ - org.opencontainers.image.authors="Tobias Maier " \ - org.opencontainers.image.description="This docker image installs docker-compose on top of the docker image." \ - org.opencontainers.image.licenses="MIT" \ - org.opencontainers.image.source="https://github.com/tmaier/docker-compose" \ - org.opencontainers.image.title="Docker Compose on docker base image" \ - org.opencontainers.image.vendor="BauCloud GmbH" \ - org.opencontainers.image.version="${DOCKER_VERSION} with docker-compose ${COMPOSE_VERSION}" diff --git a/18/docker-compose.test.yml b/18/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/18/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version diff --git a/DOCKER_AND_COMPOSE_VERSION_MATRIX b/DOCKER_AND_COMPOSE_VERSION_MATRIX new file mode 100644 index 0000000..16ed21d --- /dev/null +++ b/DOCKER_AND_COMPOSE_VERSION_MATRIX @@ -0,0 +1,9 @@ +1.12 1.8.* +1.13 1.10.* +17 1.18.* +17.03 1.11.* +17.06 1.15.* +17.09 1.16.* +17.12 1.18.* +18 1.19.* +18.02 1.19.* diff --git a/latest/Dockerfile b/Dockerfile similarity index 100% rename from latest/Dockerfile rename to Dockerfile diff --git a/README.md b/README.md index 19ee27a..c1d9a34 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ There are versions based on different docker versions, e.g. `latest`, `17.06`, ` docker-compose matches the latest minor version available when the docker release was made. Eg, `17.06` includes docker-compose 1.15.0. The `latest` tag always includes the latest docker-compose build. +All available Docker Engine versions and the respective Docker Compose versions are defined in [`DOCKER_AND_COMPOSE_VERSION_MATRIX`](./DOCKER_AND_COMPOSE_VERSION_MATRIX). + Please open an issue or a pull request (preferred) [at GitHub](https://github.com/tmaier/docker-compose), if a version is missing. ## Usage instructions for GitLab CI diff --git a/1.12/docker-compose.test.yml b/docker-compose.test.yml similarity index 100% rename from 1.12/docker-compose.test.yml rename to docker-compose.test.yml diff --git a/hooks/build b/hooks/build new file mode 100755 index 0000000..9b6f10f --- /dev/null +++ b/hooks/build @@ -0,0 +1,15 @@ +#!/usr/bin/env sh + +set -ex + +while read -r docker_version compose_version; +do + image=${DOCKER_REPO}:${docker_version} + echo "# Building image ${image}..." + + docker build \ + --build-arg DOCKER_VERSION="${docker_version}" \ + --build-arg COMPOSE_VERSION="${compose_version}" \ + --pull \ + -t "${image}" . +done < DOCKER_AND_COMPOSE_VERSION_MATRIX diff --git a/hooks/push b/hooks/push new file mode 100755 index 0000000..3fba919 --- /dev/null +++ b/hooks/push @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +set -ex + +while read -r docker_version _; +do + image=${DOCKER_REPO}:${docker_version} + echo "# Pushing image ${image}..." + + docker image push "${image}" +done < DOCKER_AND_COMPOSE_VERSION_MATRIX diff --git a/hooks/test b/hooks/test new file mode 100755 index 0000000..1e7f047 --- /dev/null +++ b/hooks/test @@ -0,0 +1,19 @@ +#!/usr/bin/env sh + +set -ex + +while read -r docker_version _; +do + image=${DOCKER_REPO}:${docker_version} + echo "# Testing image ${image}..." + export IMAGE_NAME="${image}" + + container=$(docker-compose -f docker-compose.test.yml run -d sut) + + if [ "$(docker container wait "${container}")" != "0" ] + then + echo "Test of ${IMAGE_NAME} failed" + exit 1 + fi + docker-compose -f docker-compose.test.yml rm --force sut +done < DOCKER_AND_COMPOSE_VERSION_MATRIX diff --git a/latest/docker-compose.test.yml b/latest/docker-compose.test.yml deleted file mode 100644 index 476f460..0000000 --- a/latest/docker-compose.test.yml +++ /dev/null @@ -1,5 +0,0 @@ -version: '3' -services: - sut: - image: ${IMAGE_NAME} - command: docker-compose version