File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -141,10 +141,12 @@ prevents using needless volatile data there.
141
141
## with Docker/Podman
142
142
143
143
144
- By default, Docker will not copy the ` .git ` folder into your container.
145
- Therefore, builds with version inference might fail.
146
- Consequently, you can use the following snippet to infer the version from
147
- the host OS without copying the entire ` .git ` folder to your ` Dockerfile ` .
144
+ In some situations, Docker may not copy the ` .git ` into the container when
145
+ building images. Because of this, builds with version inference may fail.
146
+
147
+ The following snippet exposes the external ` .git ` directory without copying.
148
+ This allows the version to be inferred properly form inside the container
149
+ without copying the entire ` .git ` folder into the container image.
148
150
149
151
``` dockerfile
150
152
RUN --mount=source=.git,target=.git,type=bind \
You can’t perform that action at this time.
0 commit comments