2023-10-26 18:19:20 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd $( dirname $0 )
|
2024-02-22 16:57:18 +01:00
|
|
|
DIST="$1"
|
2023-10-26 18:19:20 +02:00
|
|
|
|
|
|
|
# Need to use Dockerfile+ (https://github.com/edrevo/dockerfile-plus)
|
|
|
|
export DOCKER_BUILDKIT=1
|
|
|
|
export COMPOSE_DOCKER_CLI_BUILD=1
|
|
|
|
DISTS=(bookworm bullseye buster)
|
|
|
|
LATEST_DIST=${DISTS[0]}
|
|
|
|
|
|
|
|
for dist in ${DISTS[@]}
|
|
|
|
do
|
2024-02-22 16:57:18 +01:00
|
|
|
[ -n "$DIST" -a "$DIST" != "$dist" ] && continue
|
|
|
|
docker build -t docker.io/brenard/ldapsaisie:$dist -f Dockerfile.$dist .
|
|
|
|
[ $? -eq 0 ] && docker push docker.io/brenard/ldapsaisie:$dist
|
2023-10-26 18:19:20 +02:00
|
|
|
done
|
|
|
|
|
2024-02-22 16:57:18 +01:00
|
|
|
[ -n "$DIST" -a "$DIST" != "latest" ] && exit
|
|
|
|
|
|
|
|
docker build -t docker.io/brenard/ldapsaisie:latest -f Dockerfile.$LATEST_DIST .
|
|
|
|
[ $? -eq 0 ] && docker push docker.io/brenard/ldapsaisie:latest
|