Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8b8800d76d |
@@ -592,15 +592,14 @@ appears in the startup log and in the health check response.
|
|||||||
|
|
||||||
The image takes it the same way, from the `.git` the build context carries, so a
|
The image takes it the same way, from the `.git` the build context carries, so a
|
||||||
plain `docker build .` of a clone stamps the commit it was built from; a clone
|
plain `docker build .` of a clone stamps the commit it was built from; a clone
|
||||||
without tags stamps the short commit. A shallow clone carries only a tag on its
|
without tags, such as a shallow one, stamps the short commit. `.dockerignore`
|
||||||
own commit, so a shallow clone of an untagged commit stamps the short commit.
|
sends `.git` without `.git/config`, which `git describe` does not need and which
|
||||||
`.dockerignore` sends `.git` without `.git/config`, which `git describe` does
|
can hold a credential. A non-empty `--build-arg VERSION=...` takes precedence;
|
||||||
not need and which can hold a credential. A non-empty `--build-arg VERSION=...`
|
`make docker` passes the version `git describe` gives on the host. The build
|
||||||
takes precedence; `make docker` passes the version `git describe` gives on the
|
fails when the context carries `.git`, as a directory or as a file, and the
|
||||||
host. The build fails when the context carries `.git`, as a directory or as a
|
version comes out empty, `dev` or `unknown`. `.dockerignore` must list no
|
||||||
file, and the version comes out empty, `dev` or `unknown`. `.dockerignore` must
|
tracked file: git in the build would see it as deleted and mark the version
|
||||||
list no tracked file: git in the build would see it as deleted and mark the
|
`-dirty`.
|
||||||
version `-dirty`.
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user