mirror of
https://github.com/tmaier/docker-compose
synced 2024-11-21 23:42:05 +01:00
Change approach for tagging the docker image
Past: docker version Now: docker compose version Reasoning: We need to do larger changes to the Dockerfile to support Docker Compose v2
This commit is contained in:
parent
8ab198f3cf
commit
c3599cc962
@ -1,3 +1,2 @@
|
||||
latest
|
||||
20 1.29.*
|
||||
20.10 1.29.*
|
||||
|
@ -10,10 +10,10 @@ This is very useful for CI pipelines, which leverage "Docker in Docker".
|
||||
|
||||
## Docker versions supported
|
||||
|
||||
There are versions based on different docker versions, e.g. `latest`, `20.10`, `19.03` and `19`.
|
||||
Note: In the past. this docker image (tags) focused on the docker version (e.g. `latest`, `20.10`, `19.03` and `19`).
|
||||
But as the docker releases got less disruptive, the approach changes to use the docker compose version as tags.
|
||||
|
||||
docker-compose matches the latest version compatible with the respective docker release.
|
||||
Eg, `20.10` includes docker-compose 1.27.4. The `latest` tag always includes the latest docker-compose build.
|
||||
The Docker Compose versions supported here use the most recent docker version compatible with it.
|
||||
|
||||
All available Docker Engine versions and the respective Docker Compose versions are defined in [`DOCKER_AND_COMPOSE_VERSION_MATRIX`](./DOCKER_AND_COMPOSE_VERSION_MATRIX).
|
||||
|
||||
|
11
hooks/build
11
hooks/build
@ -1,10 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
while read -r docker_version compose_version;
|
||||
do
|
||||
image=${DOCKER_REPO}:${docker_version}
|
||||
if [ -z "${compose_version}" ]
|
||||
then
|
||||
tag="latest"
|
||||
else
|
||||
tag="${compose_version%.*}"
|
||||
fi
|
||||
image=${DOCKER_REPO}:${tag}
|
||||
|
||||
echo "# Building image ${image}..."
|
||||
|
||||
docker build \
|
||||
|
13
hooks/push
13
hooks/push
@ -1,10 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
while read -r docker_version _;
|
||||
while read -r _ compose_version;
|
||||
do
|
||||
image=${DOCKER_REPO}:${docker_version}
|
||||
if [ -z "${compose_version}" ]
|
||||
then
|
||||
tag="latest"
|
||||
else
|
||||
tag="${compose_version%.*}"
|
||||
fi
|
||||
image=${DOCKER_REPO}:${tag}
|
||||
|
||||
echo "# Pushing image ${image}..."
|
||||
|
||||
docker image push "${image}"
|
||||
|
13
hooks/test
13
hooks/test
@ -1,10 +1,17 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
set -ex
|
||||
set -e
|
||||
|
||||
while read -r docker_version _;
|
||||
while read -r docker_version compose_version;
|
||||
do
|
||||
image=${DOCKER_REPO}:${docker_version}
|
||||
if [ -z "${compose_version}" ]
|
||||
then
|
||||
tag="latest"
|
||||
else
|
||||
tag="${compose_version%.*}"
|
||||
fi
|
||||
image=${DOCKER_REPO}:${tag}
|
||||
|
||||
echo "# Testing image ${image}..."
|
||||
export IMAGE_NAME="${image}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user