docker-postfix/build.sh
Sergio Del Río Mayoral a1a2082ae1 Add email anonymizer option in case is needed for GDPR
This new feature will anonymize emails in the Postfix logs. This allows
you to keep them indefinetely while being compliant with GDPR.

Based on excellent work on [this pull request](https://github.com/bokysan/docker-postfix/pull/91).

Check `README.md` for more details.
2021-12-07 13:43:13 +01:00

27 lines
704 B
Bash
Executable file

#!/usr/bin/env bash
# Do a multistage build
export DOCKER_BUILDKIT=1
export DOCKER_CLI_EXPERIMENTAL=enabled
export BUILDKIT_PROGRESS=plain
if ! docker buildx inspect multiarch > /dev/null; then
docker buildx create --name multiarch
fi
docker buildx use multiarch
if [[ "$*" == *--push* ]]; then
if [[ -n "$DOCKER_USERNAME" ]] && [[ -n "$DOCKER_PASSWORD" ]]; then
echo "Logging into docker registry $DOCKER_REGISTRY_URL...."
echo "$DOCKER_PASSWORD" | docker login --username $DOCKER_USERNAME --password-stdin $DOCKER_REGISTRY_URL
fi
fi
if [[ -z "$PLATFORMS" ]]; then
PLATFORMS="linux/amd64,linux/arm64,linux/arm/v7"
fi
docker buildx build --platform $PLATFORMS . $*