Docker: add build-and-push-all.sh

This commit is contained in:
Benjamin Renard 2023-10-26 18:19:20 +02:00
parent f176b626d5
commit 129cfa537b
Signed by: bn8
GPG key ID: 3E2E1CE1907115BC
5 changed files with 33 additions and 1 deletions

View file

@ -0,0 +1,5 @@
# syntax = edrevo/dockerfile-plus
FROM debian:bookworm-slim
INCLUDE+ Dockerfile.common

View file

@ -0,0 +1,5 @@
# syntax = edrevo/dockerfile-plus
FROM debian:bullseye-slim
INCLUDE+ Dockerfile.common

5
docker/Dockerfile.buster Normal file
View file

@ -0,0 +1,5 @@
# syntax = edrevo/dockerfile-plus
FROM debian:buster-slim
INCLUDE+ Dockerfile.common

View file

@ -1,4 +1,3 @@
FROM debian:11
# Update/upgrade
RUN apt-get update
RUN apt-get upgrade -y

View file

@ -0,0 +1,18 @@
#!/bin/bash
cd $( dirname $0 )
# 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
docker build -t brenard/ldapsaisie:$dist -f Dockerfile.$dist .
[ $? -eq 0 ] && docker push brenard/ldapsaisie:$dist
done
docker build -t brenard/ldapsaisie:latest -f Dockerfile.$LATEST_DIST .
[ $? -eq 0 ] && docker push brenard/ldapsaisie:latest