Browse code

Clarify warning against using build-time variables for secrets

Signed-off-by: Dave Henderson <dhenderson@gmail.com>
(cherry picked from commit 9af24ba3ac9c2efbb8ec7edef4668650a3c31834)
Signed-off-by: Tibor Vass <tibor@docker.com>

Dave Henderson authored on 2016/07/12 10:18:03
Showing 2 changed files
... ...
@@ -1292,8 +1292,9 @@ subsequent line 3. The `USER` at line 4 evaluates to `what_user` as `user` is
1292 1292
 defined and the `what_user` value was passed on the command line. Prior to its definition by an
1293 1293
 `ARG` instruction, any use of a variable results in an empty string.
1294 1294
 
1295
-> **Note:** It is not recommended to use build-time variables for
1296
->  passing secrets like github keys, user credentials etc.
1295
+> **Warning:** It is not recommended to use build-time variables for
1296
+>  passing secrets like github keys, user credentials etc. Build-time variable
1297
+>  values are visible to any user of the image with the `docker history` command.
1297 1298
 
1298 1299
 You can use an `ARG` or an `ENV` instruction to specify variables that are
1299 1300
 available to the `RUN` instruction. Environment variables defined using the
... ...
@@ -376,8 +376,9 @@ A Dockerfile is similar to a Makefile.
376 376
   defined and the `what_user` value was passed on the command line. Prior to its definition by an
377 377
   `ARG` instruction, any use of a variable results in an empty string.
378 378
 
379
-  > **Note:** It is not recommended to use build-time variables for
380
-  >  passing secrets like github keys, user credentials etc.
379
+  > **Warning:** It is not recommended to use build-time variables for
380
+  >  passing secrets like github keys, user credentials etc. Build-time variable
381
+  >  values are visible to any user of the image with the `docker history` command.
381 382
 
382 383
   You can use an `ARG` or an `ENV` instruction to specify variables that are
383 384
   available to the `RUN` instruction. Environment variables defined using the