1
0
Fork 0
mirror of https://gitlab.easter-eggs.com/ee/ldapsaisie.git synced 2024-12-24 09:23:47 +01:00
ldapsaisie/docker/build-and-push-all.sh

23 lines
643 B
Bash
Raw Normal View History

2023-10-26 18:19:20 +02:00
#!/bin/bash
cd $( dirname $0 )
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
[ -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
[ -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