Allow dst and destination for target in secret mounts

Fixes: https://github.com/containers/buildah/issues/3396

Patch from @mixedCase

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh 2021-07-22 14:46:05 -04:00
parent 2fb04d5a4e
commit bb738d4406
No known key found for this signature in database
GPG Key ID: A2DF901DABE2C028
2 changed files with 2 additions and 2 deletions

View File

@ -2334,7 +2334,7 @@ func getSecretMount(tokens []string, secrets map[string]string, mountlabel strin
switch kv[0] {
case "id":
id = kv[1]
case "target":
case "target", "dst", "destination":
target = kv[1]
case "required":
required, err = strconv.ParseBool(kv[1])

View File

@ -1,2 +1,2 @@
FROM alpine
RUN --mount=type=secret,id=mysecret,target=/mysecret,uid=1000,gid=1001,mode=0444 stat -c "%a" /mysecret ; ls -n /mysecret
RUN --mount=type=secret,id=mysecret,dst=/mysecret,uid=1000,gid=1001,mode=0444 stat -c "%a" /mysecret ; ls -n /mysecret