mirror of https://github.com/bitnami/minideb.git
Enable signing of images to push process (#53)
This change enables Docker Content Trust for the tags being pushed. I configured Travis to set the required key and passphrase. Fixes #48.
This commit is contained in:
parent
c3b5ba1143
commit
883d28ccad
8
pushall
8
pushall
|
|
@ -25,6 +25,14 @@ if [ -n "${GCR_KEY:-}" ]; then
|
|||
gcloud auth activate-service-account "$GCR_EMAIL" --key-file <(echo "$GCR_KEY")
|
||||
fi
|
||||
|
||||
if [ -n "${DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE:-}" -a -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY:-}" ]; then
|
||||
tmpdir=$(mktemp -d)
|
||||
bash -c 'echo -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY}" > "${tmpdir}/key"'
|
||||
docker trust key load "${tmpdir}/key"
|
||||
rm -rf "${tmpdir}"
|
||||
export DOCKER_CONTENT_TRUST=1
|
||||
fi
|
||||
|
||||
for DIST in $DISTS; do
|
||||
docker push "${BASENAME}:${DIST}"
|
||||
docker push "${QUAY_BASENAME}:${DIST}"
|
||||
|
|
|
|||
Loading…
Reference in New Issue