mirror of
https://github.com/tmaier/docker-compose
synced 2024-11-22 07:51:58 +01:00
Merge pull request #6 from BauCloud/master
Rework build process using Docker Hub hooks
This commit is contained in:
commit
78cce2b1cb
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
@ -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 <tobias.maier@baucloud.com>" \
|
||||
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}"
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
9
DOCKER_AND_COMPOSE_VERSION_MATRIX
Normal file
9
DOCKER_AND_COMPOSE_VERSION_MATRIX
Normal file
@ -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.*
|
@ -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
|
||||
|
15
hooks/build
Executable file
15
hooks/build
Executable file
@ -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
|
11
hooks/push
Executable file
11
hooks/push
Executable file
@ -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
|
19
hooks/test
Executable file
19
hooks/test
Executable file
@ -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
|
@ -1,5 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
sut:
|
||||
image: ${IMAGE_NAME}
|
||||
command: docker-compose version
|
Loading…
Reference in New Issue
Block a user