Skip to content

Commit f0f541f

Browse files
committed
more code review comments
1 parent 74992e4 commit f0f541f

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

common/docs/containerignore.5.md

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,41 @@ temp?
3636
```
3737

3838
This file causes the following build behavior:
39-
Rule Behavior
4039

41-
```
42-
# comment Ignored.
43-
*/temp* Exclude files and directories whose names start with temp in any immediate subdirectory of the root.
44-
For example, the plain file /somedir/temporary.txt is excluded, as is the directory /somedir/temp.
45-
*/*/temp* Exclude files and directories starting with temp from any subdirectory that is two levels below the
46-
root. For example, /somedir/subdir/temporary.txt is excluded.
47-
temp? Exclude files and directories in the root directory whose names are a one-character extension of temp. For example, /tempa and /tempb are excluded.
48-
```
40+
`#comment`: Lines that start with the `#` character are ignored.
41+
42+
`*/temp*`: Exclude files and directories whose names start with temp in any
43+
immediate subdirectory of the root. For example, the plain file
44+
/somedir/temporary.txt is excluded, as is the directory /somedir/temp.
45+
46+
`*/*/temp*`: Exclude files and directories starting with temp from any
47+
subdirectory that is two levels below the root. For example,
48+
/somedir/subdir/temporary.txt is excluded.
4949

50-
Matching is done using the golang `path/filepath` package.
50+
`temp?`: Exclude files and directories in the root directory whose names are a
51+
one-character extension of temp. For example, /tempa and /tempb are excluded.
5152

52-
Match rules:
53-
* A preprocessing step removes leading and trailing whitespace and eliminates
54-
. and .. elements using the golang `path/filepath` package.
55-
* Lines that are blank after preprocessing are ignored.
53+
54+
Matching is done using the `filepath.Match` rules:
55+
56+
* A preprocessing step removes leading and trailing whitespace and eliminates
57+
. and .. elements using the golang `path/filepath` package.
58+
* Lines that are blank after preprocessing are ignored.
5659

5760
Beyond the `filepath.Match` rules, Docker also supports a special wildcard
5861
string `**` that matches any number of directories (including zero). For
5962
example, `**/*.go` will exclude all files that end with `.go` that are found in
6063
all directories, including the root of the build context.
6164

6265
Lines starting with `!` (exclamation mark) can be used to make exceptions to
63-
exclusions. The following is an example .containerignore file that uses this
66+
exclusions. The following is an example `.containerignore` file that uses this
6467
mechanism:
6568

6669
```
6770
*.md
6871
!README.md
6972
```
73+
7074
All markdown files except README.md are excluded from the context.
7175

7276
The placement of `!` exception rules influences the behavior: the last line of
@@ -78,7 +82,8 @@ included or excluded. Consider the following example:
7882
!README*.md
7983
README-secret.md
8084
```
81-
No markdown files are included in the context except README files other than README-secret.md.
85+
86+
No markdown files are included in the context except `README` files other than `README-secret.md`.
8287

8388
Now consider this example:
8489

@@ -104,4 +109,4 @@ followed by one or more `!` exception patterns.
104109
buildah-build(1), podman-build(1), docker-build(1)
105110

106111
# HISTORY
107-
*Sep 2021, Compiled by Dan Walsh (dwalsh at redhat dot com) based on docker.com .dockerignore documentation.
112+
*Sep 2021, Compiled by Dan Walsh (dwalsh at redhat dot com) based on docker.com `.dockerignore` documentation.

0 commit comments

Comments
 (0)