mirror of
https://github.com/bitnami/minideb.git
synced 2026-06-04 10:13:55 +08:00
Decode key value (#56)
* Decode key value The docker content trust repository key is base64-encoded, so let's decode it before dumping it to a file * decode option is `-d` in Linux
This commit is contained in:
@@ -27,7 +27,7 @@ fi
|
||||
|
||||
if [ -n "${DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE:-}" -a -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY:-}" ]; then
|
||||
tmpdir=$(mktemp -d)
|
||||
(cd "${tmpdir}" && bash -c 'echo -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY}" > key')
|
||||
(cd "${tmpdir}" && bash -c 'echo -n "${DOCKER_CONTENT_TRUST_REPOSITORY_KEY}" | base64 -d > key')
|
||||
chmod 400 "${tmpdir}/key"
|
||||
docker trust key load "${tmpdir}/key"
|
||||
rm -rf "${tmpdir}"
|
||||
|
||||
Reference in New Issue
Block a user