mirror of
https://github.com/bokysan/docker-postfix.git
synced 2024-09-20 14:56:10 +08:00
a1a2082ae1
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.
27 lines
704 B
Bash
Executable file
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 . $*
|
|
|