mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
docs: invite people to use docker --pull (#1305)
* www/docker: invite people to use --pull Signed-off-by: Yoan Blanc <yoan@dosimple.ch> * fixup! www/docker: invite people to use --pull Signed-off-by: Yoan Blanc <yoan@dosimple.ch> * goreleaser: label-schema is deprecated Signed-off-by: Yoan Blanc <yoan@dosimple.ch> * fixup! goreleaser: label-schema is deprecated Signed-off-by: Yoan Blanc <yoan@dosimple.ch> Co-authored-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
b367abd785
commit
1d7098ed42
@ -38,9 +38,11 @@ dockers:
|
||||
binaries:
|
||||
- goreleaser
|
||||
build_flag_templates:
|
||||
- "--label=org.label-schema.schema-version=1.0"
|
||||
- "--label=org.label-schema.version={{.Version}}"
|
||||
- "--label=org.label-schema.name={{.ProjectName}}"
|
||||
- "--pull"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.name={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
extra_files:
|
||||
- scripts/entrypoint.sh
|
||||
- image_templates:
|
||||
@ -51,9 +53,12 @@ dockers:
|
||||
binaries:
|
||||
- goreleaser
|
||||
build_flag_templates:
|
||||
- "--label=org.label-schema.schema-version=1.0"
|
||||
- "--label=org.label-schema.version={{.Version}}"
|
||||
- "--label=org.label-schema.name={{.ProjectName}}"
|
||||
- "--pull"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.name={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
- "--label=org.opencontainers.image.source={{.GitURL}}"
|
||||
- "--label=com.github.actions.name={{.ProjectName}}"
|
||||
- "--label=com.github.actions.description=Deliver Go binaries as fast and easily as possible"
|
||||
- "--label=com.github.actions.icon=terminal"
|
||||
|
@ -84,9 +84,11 @@ dockers:
|
||||
|
||||
# Template of the docker build flags.
|
||||
build_flag_templates:
|
||||
- "--label=org.label-schema.schema-version=1.0"
|
||||
- "--label=org.label-schema.version={{.Version}}"
|
||||
- "--label=org.label-schema.name={{.ProjectName}}"
|
||||
- "--pull"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.name={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
- "--build-arg=FOO={{.Env.Bar}}"
|
||||
|
||||
# If your Dockerfile copies files other than the binary itself,
|
||||
@ -198,18 +200,22 @@ dockers:
|
||||
image_templates:
|
||||
- "myuser/myimage"
|
||||
build_flag_templates:
|
||||
- "--label=org.label-schema.schema-version=1.0"
|
||||
- "--label=org.label-schema.version={{.Version}}"
|
||||
- "--label=org.label-schema.name={{.ProjectName}}"
|
||||
- "--pull"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.name={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
```
|
||||
|
||||
This will execute the following command:
|
||||
|
||||
```bash
|
||||
docker build -t myuser/myimage . \
|
||||
--label=org.label-schema.schema-version=1.0 \
|
||||
--label=org.label-schema.version=1.6.4 \
|
||||
--label=org.label-schema.name=mybinary"
|
||||
--pull \
|
||||
--label=org.opencontainers.image.created=2020-01-19T15:58:07Z" \
|
||||
--label=org.opencontainers.image.name=mybinary" \
|
||||
--label=org.opencontainers.image.revision=da39a3ee5e6b4b0d3255bfef95601890afd80709" \
|
||||
--label=org.opencontainers.image.version=1.6.4
|
||||
```
|
||||
|
||||
> Learn more about the [name template engine](/templates).
|
||||
|
Loading…
x
Reference in New Issue
Block a user