Update build_enhancements.md

This commit is contained in:
Anne Henmi 2018-11-01 11:34:55 -06:00 committed by GitHub
parent 4ad27ec5d8
commit 15c918845f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -118,11 +118,11 @@ For example, with a secret piece of information stored in a text file:
$ echo 'WARMACHINEROX' > mysecret.txt $ echo 'WARMACHINEROX' > mysecret.txt
``` ```
And with a Dockerfile that specifies use of a buildkit frontend `dockerfile:secrets20180828`, the secret can be accessed. And with a Dockerfile that specifies use of a buildkit frontend `docker/dockerfile:1.0-experimental`, the secret can be accessed.
For example: For example:
``` ```
# syntax = dockerfile:secrets20180828 # syntax = docker/dockerfile:1.0-experimental
FROM alpine FROM alpine
RUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret # shows secret from default secret location RUN --mount=type=secret,id=mysecret cat /run/secrets/mysecret # shows secret from default secret location
RUN --mount=type=secret,id=mysecret,dst=/foobar cat /foobar # shows secret from custom secret location RUN --mount=type=secret,id=mysecret,dst=/foobar cat /foobar # shows secret from custom secret location