mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-28 17:52:25 -05:00
[packaging] Use buildx for multi-arch Docker builds (#413)
* update drone to create latest manifest * add .dockerignore file * use buildx for multi-arch builds see https://docs.docker.com/buildx/working-with-buildx/ * don't use RUN commands in Dockerfile this was breaking multi-arch builds
This commit is contained in:
parent
64d9a34c65
commit
6b634de6b2
4 changed files with 59 additions and 30 deletions
|
|
@ -39,6 +39,9 @@ builds:
|
|||
- amd64
|
||||
- arm
|
||||
- arm64
|
||||
goarm:
|
||||
- 6
|
||||
- 7
|
||||
ignore:
|
||||
# build freebsd only for amd64
|
||||
- goos: freebsd
|
||||
|
|
@ -51,13 +54,14 @@ builds:
|
|||
dockers:
|
||||
# https://goreleaser.com/customization/docker/
|
||||
-
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
image_templates:
|
||||
# - "superseriousbusiness/{{ .ProjectName }}:latest"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-amd64"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:latest-amd64"
|
||||
build_flag_templates:
|
||||
- --platform=linux/amd64
|
||||
- "--platform=linux/amd64"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
|
|
@ -65,13 +69,14 @@ dockers:
|
|||
extra_files:
|
||||
- web
|
||||
-
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm64
|
||||
image_templates:
|
||||
# - "superseriousbusiness/{{ .ProjectName }}:latest"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-arm64v8"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:latest-arm64v8"
|
||||
build_flag_templates:
|
||||
- --platform=linux/arm64/v8
|
||||
- "--platform=linux/arm64/v8"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
|
|
@ -79,13 +84,31 @@ dockers:
|
|||
extra_files:
|
||||
- web
|
||||
-
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm
|
||||
goarm: 6
|
||||
image_templates:
|
||||
# - "superseriousbusiness/{{ .ProjectName }}:latest"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv7"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv6"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:latest-armv6"
|
||||
build_flag_templates:
|
||||
- --platform=linux/arm/v7
|
||||
- "--platform=linux/arm/v6"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
- "--label=org.opencontainers.image.version={{.Version}}"
|
||||
extra_files:
|
||||
- web
|
||||
-
|
||||
use: buildx
|
||||
goos: linux
|
||||
goarch: arm
|
||||
goarm: 7
|
||||
image_templates:
|
||||
- "superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv7"
|
||||
- "superseriousbusiness/{{ .ProjectName }}:latest-armv7"
|
||||
build_flag_templates:
|
||||
- "--platform=linux/arm/v7"
|
||||
- "--label=org.opencontainers.image.created={{.Date}}"
|
||||
- "--label=org.opencontainers.image.title={{.ProjectName}}"
|
||||
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
|
||||
|
|
@ -97,12 +120,14 @@ docker_manifests:
|
|||
image_templates:
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-amd64
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-arm64v8
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv6
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv7
|
||||
- name_template: superseriousbusiness/{{ .ProjectName }}:latest
|
||||
image_templates:
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-amd64
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-arm64v8
|
||||
- superseriousbusiness/{{ .ProjectName }}:{{ .Version }}-armv7
|
||||
- superseriousbusiness/{{ .ProjectName }}:latest-amd64
|
||||
- superseriousbusiness/{{ .ProjectName }}:latest-arm64v8
|
||||
- superseriousbusiness/{{ .ProjectName }}:latest-armv6
|
||||
- superseriousbusiness/{{ .ProjectName }}:latest-armv7
|
||||
archives:
|
||||
# https://goreleaser.com/customization/archive/
|
||||
-
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue