80
80
81
81
Comments don't support line continuation characters.
82
82
83
+ > [ !NOTE]
83
84
> ** Note on whitespace**
84
85
>
85
86
> For backward compatibility, leading whitespace before comments (` # ` ) and
@@ -857,8 +858,7 @@ can be controlled by an earlier build stage.
857
858
The command is run in the host's network environment (similar to
858
859
` docker build --network=host ` , but on a per-instruction basis)
859
860
860
- > ** Warning**
861
- >
861
+ > [ !WARNING]
862
862
> The use of ` --network=host ` is protected by the ` network.host ` entitlement,
863
863
> which needs to be enabled when starting the buildkitd daemon with
864
864
> ` --allow-insecure-entitlement network.host ` flag or in [ buildkitd config] ( https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md ) ,
@@ -867,8 +867,7 @@ The command is run in the host's network environment (similar to
867
867
868
868
### RUN --security
869
869
870
- > ** Note**
871
- >
870
+ > [ !NOTE]
872
871
> Not yet available in stable syntax, use [ ` docker/dockerfile:1-labs ` ] ( #syntax ) version.
873
872
874
873
``` dockerfile
@@ -880,8 +879,7 @@ With `--security=insecure`, the builder runs the command without sandbox in inse
880
879
mode, which allows to run flows requiring elevated privileges (e.g. containerd).
881
880
This is equivalent to running ` docker run --privileged ` .
882
881
883
- > ** Warning**
884
- >
882
+ > [ !WARNING]
885
883
> In order to access this feature, entitlement ` security.insecure ` should be
886
884
> enabled when starting the buildkitd daemon with
887
885
> ` --allow-insecure-entitlement security.insecure ` flag or in [ buildkitd config] ( https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md ) ,
@@ -931,8 +929,7 @@ If `CMD` is used to provide default arguments for the `ENTRYPOINT` instruction,
931
929
both the ` CMD ` and ` ENTRYPOINT ` instructions should be specified in the
932
930
[ exec form] ( #exec-form ) .
933
931
934
- > ** Note**
935
- >
932
+ > [ !NOTE]
936
933
> Don't confuse ` RUN ` with ` CMD ` . ` RUN ` actually runs a command and commits
937
934
> the result; ` CMD ` doesn't execute anything at build time, but specifies
938
935
> the intended command for the image.
@@ -970,8 +967,7 @@ LABEL multi.label1="value1" \
970
967
other="value3"
971
968
```
972
969
973
- > ** Note**
974
- >
970
+ > [ !NOTE]
975
971
> Be sure to use double quotes and not single quotes. Particularly when you are
976
972
> using string interpolation (e.g. ` LABEL example="foo-$ENV_VAR" ` ), single
977
973
> quotes will take the string as is without unpacking the variable's value.
@@ -1121,6 +1117,7 @@ ARG DEBIAN_FRONTEND=noninteractive
1121
1117
RUN apt-get update && apt-get install -y ...
1122
1118
```
1123
1119
1120
+ > [ !NOTE]
1124
1121
> ** Alternative syntax**
1125
1122
>
1126
1123
> The ` ENV ` instruction also allows an alternative syntax ` ENV <key> <value> ` ,
@@ -1275,8 +1272,7 @@ The result is the union of:
1275
1272
2 . The contents of the source tree, with conflicts resolved in favor of the
1276
1273
content being added, on a file-by-file basis.
1277
1274
1278
- > ** Note**
1279
- >
1275
+ > [ !NOTE]
1280
1276
> Whether a file is identified as a recognized compression format or not is
1281
1277
> done solely based on the contents of the file, not the name of the file. For
1282
1278
> example, if an empty file happens to end with ` .tar.gz ` this isn't recognized
@@ -1609,8 +1605,7 @@ image or stage that you specify.
1609
1605
1610
1606
### COPY --chown --chmod
1611
1607
1612
- > ** Note**
1613
- >
1608
+ > [ !NOTE]
1614
1609
> Only octal notation is currently supported. Non-octal support is tracked in
1615
1610
> [ moby/buildkit #1951 ] ( https://github.com/moby/buildkit/issues/1951 ) .
1616
1611
@@ -1731,8 +1726,7 @@ conditions for cache reuse.
1731
1726
1732
1727
### COPY --parents
1733
1728
1734
- > ** Note**
1735
- >
1729
+ > [ !NOTE]
1736
1730
> Not yet available in stable syntax, use [ ` docker/dockerfile:1.7-labs ` ] ( #syntax ) version.
1737
1731
1738
1732
``` dockerfile
@@ -1789,8 +1783,7 @@ with the `--parents` flag, the Buildkit is capable of packing multiple
1789
1783
1790
1784
### COPY --exclude
1791
1785
1792
- > ** Note**
1793
- >
1786
+ > [ !NOTE]
1794
1787
> Not yet available in stable syntax, use [ ` docker/dockerfile:1.7-labs ` ] ( #syntax ) version.
1795
1788
1796
1789
``` dockerfile
@@ -1987,8 +1980,7 @@ user 0m 0.03s
1987
1980
sys 0m 0.03s
1988
1981
```
1989
1982
1990
- > ** Note**
1991
- >
1983
+ > [ !NOTE]
1992
1984
> You can override the ` ENTRYPOINT ` setting using ` --entrypoint ` ,
1993
1985
> but this can only set the binary to exec (no ` sh -c ` will be used).
1994
1986
@@ -2095,8 +2087,7 @@ The table below shows what command is executed for different `ENTRYPOINT` / `CMD
2095
2087
| ** CMD [ "exec_cmd", "p1_cmd"] ** | exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry exec_cmd p1_cmd |
2096
2088
| ** CMD exec_cmd p1_cmd** | /bin/sh -c exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry /bin/sh -c exec_cmd p1_cmd |
2097
2089
2098
- > ** Note**
2099
- >
2090
+ > [ !NOTE]
2100
2091
> If ` CMD ` is defined from the base image, setting ` ENTRYPOINT ` will
2101
2092
> reset ` CMD ` to an empty value. In this scenario, ` CMD ` must be defined in the
2102
2093
> current image to have a value.
@@ -2174,8 +2165,7 @@ runtime, runs the relevant `ENTRYPOINT` and `CMD` commands.
2174
2165
> Note that when specifying a group for the user, the user will have _ only_ the
2175
2166
> specified group membership. Any other configured group memberships will be ignored.
2176
2167
2177
- > ** Warning**
2178
- >
2168
+ > [ !WARNING]
2179
2169
> When the user doesn't have a primary group then the image (or the next
2180
2170
> instructions) will be run with the ` root ` group.
2181
2171
>
@@ -2243,8 +2233,7 @@ The `ARG` instruction defines a variable that users can pass at build-time to
2243
2233
the builder with the ` docker build ` command using the ` --build-arg <varname>=<value> `
2244
2234
flag.
2245
2235
2246
- > ** Warning**
2247
- >
2236
+ > [ !WARNING]
2248
2237
> It isn't recommended to use build arguments for passing secrets such as
2249
2238
> user credentials, API tokens, etc. Build arguments are visible in the
2250
2239
> ` docker history ` command and in ` max ` mode provenance attestations,
0 commit comments