From edbeda79cc5f587ba1fa42d422cf288b7c9a1a03 Mon Sep 17 00:00:00 2001 From: albttx Date: Thu, 23 May 2024 15:30:18 +0100 Subject: [PATCH 1/3] chore(docker): fix binary path for dockerfiles --- Dockerfile.gno.release | 9 ++++++--- Dockerfile.gnokey.release | 6 +++--- Dockerfile.gnoland.release | 11 +++++++---- Dockerfile.gnoweb.release | 6 +++--- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/Dockerfile.gno.release b/Dockerfile.gno.release index 874d427661f..a7f03dcb401 100644 --- a/Dockerfile.gno.release +++ b/Dockerfile.gno.release @@ -1,11 +1,14 @@ FROM busybox -COPY ./gno /gno +COPY ./gno /usr/bin/gno COPY ./examples /gnoroot/examples/ COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/ COPY ./gnovm/tests/stdlibs /gnoroot/gnovm/tests/stdlibs/ ENV GNOROOT="/gnoroot/" -ENTRYPOINT [ "/gno" ] -CMD [ "" ] \ No newline at end of file +WORKDIR /gnoroot/ + +ENTRYPOINT [ "/usr/bin/gno" ] + +CMD [ "" ] diff --git a/Dockerfile.gnokey.release b/Dockerfile.gnokey.release index 4261f9272d6..d4fa7a1cf66 100644 --- a/Dockerfile.gnokey.release +++ b/Dockerfile.gnokey.release @@ -1,6 +1,6 @@ FROM busybox -COPY . / +COPY ./gnokey /usr/bin/gnokey -ENTRYPOINT [ "/gnokey" ] -CMD [ "" ] \ No newline at end of file +ENTRYPOINT [ "/usr/bin/gnokey" ] +CMD [ "" ] diff --git a/Dockerfile.gnoland.release b/Dockerfile.gnoland.release index f8bd321f67f..2918528cdcb 100644 --- a/Dockerfile.gnoland.release +++ b/Dockerfile.gnoland.release @@ -1,6 +1,6 @@ FROM busybox -COPY ./gnoland /gnoland +COPY ./gnoland /usr/bin/gnoland COPY ./examples /gnoroot/examples/ COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/ COPY ./gno.land/genesis/genesis_balances.txt /gnoroot/gno.land/genesis/genesis_balances.txt @@ -8,6 +8,9 @@ COPY ./gno.land/genesis/genesis_txs.jsonl /gnoroot/gno.land/genesis/genesis_txs. ENV GNOROOT="/gnoroot/" -EXPOSE 26657 36657 -ENTRYPOINT [ "/gnoland" ] -CMD [ "" ] \ No newline at end of file +WORKDIR /gnoroot/ + +EXPOSE 26657 26657 + +ENTRYPOINT [ "/usr/bin/gnoland" ] +CMD [ "" ] diff --git a/Dockerfile.gnoweb.release b/Dockerfile.gnoweb.release index 9bdfd8ddce2..28425eb128d 100644 --- a/Dockerfile.gnoweb.release +++ b/Dockerfile.gnoweb.release @@ -1,7 +1,7 @@ FROM busybox -COPY . / +COPY ./gnoweb /usr/bin/gnoweb EXPOSE 8888 -ENTRYPOINT [ "/gnoweb" ] -CMD [ "" ] \ No newline at end of file +ENTRYPOINT [ "/usr/bin/gnoweb" ] +CMD [ "" ] From 99656d1f7dc5cbbf3d46c68aa530d321fcbd7fab Mon Sep 17 00:00:00 2001 From: albttx Date: Mon, 27 May 2024 19:55:43 +0100 Subject: [PATCH 2/3] chore: reduce to 1 dockerfile --- .github/goreleaser-nightly.yaml | 78 ++++++++++++++++++++------------- .github/goreleaser.yaml | 78 ++++++++++++++++++++------------- Dockerfile.release | 48 ++++++++++++++++++++ 3 files changed, 142 insertions(+), 62 deletions(-) create mode 100644 Dockerfile.release diff --git a/.github/goreleaser-nightly.yaml b/.github/goreleaser-nightly.yaml index f879b37657d..0cb2a50b633 100644 --- a/.github/goreleaser-nightly.yaml +++ b/.github/goreleaser-nightly.yaml @@ -69,7 +69,7 @@ gomod: proxy: true archives: - # https://goreleaser.com/customization/archive/ + # https://goreleaser.com/customization/archive/ - files: # Standard Release Files - LICENSE.md @@ -79,28 +79,29 @@ signs: - cmd: cosign env: - COSIGN_EXPERIMENTAL=1 - certificate: '${artifact}.pem' + certificate: "${artifact}.pem" args: - sign-blob - - '--output-certificate=${certificate}' - - '--output-signature=${signature}' - - '${artifact}' + - "--output-certificate=${certificate}" + - "--output-signature=${signature}" + - "${artifact}" - "--yes" # needed on cosign 2.0.0+ artifacts: checksum output: true dockers: # https://goreleaser.com/customization/docker/ - - # gno + + # gno - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}:nightly-amd64" build_flag_templates: + - "--target=gno" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -113,13 +114,14 @@ dockers: - gnovm/stdlibs - gnovm/tests/stdlibs - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}:nightly-arm64v8" build_flag_templates: + - "--target=gno" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -132,7 +134,7 @@ dockers: - gnovm/stdlibs - gnovm/tests/stdlibs - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -140,6 +142,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}:nightly-armv6" build_flag_templates: + - "--target=gno" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -152,7 +155,7 @@ dockers: - gnovm/stdlibs - gnovm/tests/stdlibs - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -160,6 +163,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}:nightly-armv7" build_flag_templates: + - "--target=gno" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -174,13 +178,14 @@ dockers: # gnoland - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-amd64" build_flag_templates: + - "--target=gnoland" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -194,13 +199,14 @@ dockers: - examples - gnovm/stdlibs - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-arm64v8" build_flag_templates: + - "--target=gnoland" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -214,7 +220,7 @@ dockers: - examples - gnovm/stdlibs - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -222,6 +228,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-armv6" build_flag_templates: + - "--target=gnoland" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -235,7 +242,7 @@ dockers: - examples - gnovm/stdlibs - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -243,6 +250,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-armv7" build_flag_templates: + - "--target=gnoland" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -257,13 +265,14 @@ dockers: - gnovm/stdlibs # gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-amd64" build_flag_templates: + - "--target=gnokey" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -272,13 +281,14 @@ dockers: ids: - gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-arm64v8" build_flag_templates: + - "--target=gnokey" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -287,7 +297,7 @@ dockers: ids: - gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -295,6 +305,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-armv6" build_flag_templates: + - "--target=gnokey" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -303,7 +314,7 @@ dockers: ids: - gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -311,6 +322,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-armv7" build_flag_templates: + - "--target=gnokey" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -318,16 +330,17 @@ dockers: - "--label=org.opencontainers.image.version={{.Version}}" ids: - gnokey - + # gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:nightly-amd64" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -336,13 +349,14 @@ dockers: ids: - gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:nightly-arm64v8" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -351,7 +365,7 @@ dockers: ids: - gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -359,6 +373,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:nightly-armv6" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -367,7 +382,7 @@ dockers: ids: - gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -375,6 +390,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:nightly-armv7" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -399,7 +415,7 @@ docker_manifests: - ghcr.io/gnolang/{{ .ProjectName }}:nightly-arm64v8 - ghcr.io/gnolang/{{ .ProjectName }}:nightly-armv6 - ghcr.io/gnolang/{{ .ProjectName }}:nightly-armv7 - + # gnoland - name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }} image_templates: @@ -413,7 +429,7 @@ docker_manifests: - ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-arm64v8 - ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-armv6 - ghcr.io/gnolang/{{ .ProjectName }}/gnoland:nightly-armv7 - + # gnokey - name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }} image_templates: @@ -427,7 +443,7 @@ docker_manifests: - ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-arm64v8 - ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-armv6 - ghcr.io/gnolang/{{ .ProjectName }}/gnokey:nightly-armv7 - + # gnoweb - name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }} image_templates: @@ -449,12 +465,12 @@ docker_signs: artifacts: images output: true args: - - 'sign' - - '${artifact}' + - "sign" + - "${artifact}" - "--yes" # needed on cosign 2.0.0+ checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" changelog: sort: asc @@ -482,4 +498,4 @@ release: nightly: tag_name: nightly publish_release: true - keep_single_release: true \ No newline at end of file + keep_single_release: true diff --git a/.github/goreleaser.yaml b/.github/goreleaser.yaml index d82b31ea9fb..35fdfbea0e5 100644 --- a/.github/goreleaser.yaml +++ b/.github/goreleaser.yaml @@ -69,7 +69,7 @@ gomod: proxy: true archives: - # https://goreleaser.com/customization/archive/ + # https://goreleaser.com/customization/archive/ - files: # Standard Release Files - LICENSE.md @@ -79,28 +79,29 @@ signs: - cmd: cosign env: - COSIGN_EXPERIMENTAL=1 - certificate: '${artifact}.pem' + certificate: "${artifact}.pem" args: - sign-blob - - '--output-certificate=${certificate}' - - '--output-signature=${signature}' - - '${artifact}' + - "--output-certificate=${certificate}" + - "--output-signature=${signature}" + - "${artifact}" - "--yes" # needed on cosign 2.0.0+ artifacts: checksum output: true dockers: # https://goreleaser.com/customization/docker/ - - # gno + + # gno - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}:latest-amd64" build_flag_templates: + - "--target=gno" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -113,13 +114,14 @@ dockers: - gnovm/stdlibs - gnovm/tests/stdlibs - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}:latest-arm64v8" build_flag_templates: + - "--target=gno" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -132,7 +134,7 @@ dockers: - gnovm/stdlibs - gnovm/tests/stdlibs - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -140,6 +142,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}:latest-armv6" build_flag_templates: + - "--target=gno" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -152,7 +155,7 @@ dockers: - gnovm/stdlibs - gnovm/tests/stdlibs - use: buildx - dockerfile: Dockerfile.gno.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -160,6 +163,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}:latest-armv7" build_flag_templates: + - "--target=gno" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}" @@ -174,13 +178,14 @@ dockers: # gnoland - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-amd64" build_flag_templates: + - "--target=gnoland" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -194,13 +199,14 @@ dockers: - examples - gnovm/stdlibs - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-arm64v8" build_flag_templates: + - "--target=gnoland" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -214,7 +220,7 @@ dockers: - examples - gnovm/stdlibs - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -222,6 +228,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-armv6" build_flag_templates: + - "--target=gnoland" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -235,7 +242,7 @@ dockers: - examples - gnovm/stdlibs - use: buildx - dockerfile: Dockerfile.gnoland.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -243,6 +250,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-armv7" build_flag_templates: + - "--target=gnoland" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoland" @@ -257,13 +265,14 @@ dockers: - gnovm/stdlibs # gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-amd64" build_flag_templates: + - "--target=gnokey" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -272,13 +281,14 @@ dockers: ids: - gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-arm64v8" build_flag_templates: + - "--target=gnokey" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -287,7 +297,7 @@ dockers: ids: - gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -295,6 +305,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-armv6" build_flag_templates: + - "--target=gnokey" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -303,7 +314,7 @@ dockers: ids: - gnokey - use: buildx - dockerfile: Dockerfile.gnokey.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -311,6 +322,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-armv7" build_flag_templates: + - "--target=gnokey" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnokey" @@ -318,16 +330,17 @@ dockers: - "--label=org.opencontainers.image.version={{.Version}}" ids: - gnokey - + # gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: amd64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-amd64" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:latest-amd64" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/amd64" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -336,13 +349,14 @@ dockers: ids: - gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: arm64 image_templates: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-arm64v8" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:latest-arm64v8" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/arm64/v8" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -351,7 +365,7 @@ dockers: ids: - gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 6 @@ -359,6 +373,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-armv6" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:latest-armv6" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/arm/v6" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -367,7 +382,7 @@ dockers: ids: - gnoweb - use: buildx - dockerfile: Dockerfile.gnoweb.release + dockerfile: Dockerfile.release goos: linux goarch: arm goarm: 7 @@ -375,6 +390,7 @@ dockers: - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }}-armv7" - "ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:latest-armv7" build_flag_templates: + - "--target=gnoweb" - "--platform=linux/arm/v7" - "--label=org.opencontainers.image.created={{.Date}}" - "--label=org.opencontainers.image.title={{.ProjectName}}/gnoweb" @@ -399,7 +415,7 @@ docker_manifests: - ghcr.io/gnolang/{{ .ProjectName }}:latest-arm64v8 - ghcr.io/gnolang/{{ .ProjectName }}:latest-armv6 - ghcr.io/gnolang/{{ .ProjectName }}:latest-armv7 - + # gnoland - name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnoland:{{ .Version }} image_templates: @@ -413,7 +429,7 @@ docker_manifests: - ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-arm64v8 - ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-armv6 - ghcr.io/gnolang/{{ .ProjectName }}/gnoland:latest-armv7 - + # gnokey - name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnokey:{{ .Version }} image_templates: @@ -427,7 +443,7 @@ docker_manifests: - ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-arm64v8 - ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-armv6 - ghcr.io/gnolang/{{ .ProjectName }}/gnokey:latest-armv7 - + # gnoweb - name_template: ghcr.io/gnolang/{{ .ProjectName }}/gnoweb:{{ .Version }} image_templates: @@ -449,12 +465,12 @@ docker_signs: artifacts: images output: true args: - - 'sign' - - '${artifact}' + - "sign" + - "${artifact}" - "--yes" # needed on cosign 2.0.0+ checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" changelog: sort: asc @@ -482,4 +498,4 @@ release: nightly: tag_name: nightly publish_release: true - keep_single_release: true \ No newline at end of file + keep_single_release: true diff --git a/Dockerfile.release b/Dockerfile.release new file mode 100644 index 00000000000..2e36453382e --- /dev/null +++ b/Dockerfile.release @@ -0,0 +1,48 @@ +FROM alpine AS base + +ENV GNOROOT="/gnoroot/" +WORKDIR /gnoroot/ +CMD [ "" ] + +# +## ghcr.io/gnolang/gno/gnoland +FROM base as gnoland + +COPY ./gnoland /usr/bin/gnoland +COPY ./examples /gnoroot/examples/ +COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/ +COPY ./gno.land/genesis/genesis_balances.txt /gnoroot/gno.land/genesis/genesis_balances.txt +COPY ./gno.land/genesis/genesis_txs.jsonl /gnoroot/gno.land/genesis/genesis_txs.jsonl + +EXPOSE 26656 26657 + +ENTRYPOINT [ "/usr/bin/gnoland" ] + + +# +## ghcr.io/gnolang/gno/gnokey +FROM base as gnokey + +COPY ./gnokey /usr/bin/gnokey +ENTRYPOINT [ "/usr/bin/gnokey" ] + + +# +## ghcr.io/gnolang/gno/gnoweb +FROM base as gnoweb + +COPY ./gnoweb /usr/bin/gnoweb +EXPOSE 8888 +ENTRYPOINT [ "/usr/bin/gnoweb" ] + + +# +## ghcr.io/gnolang/gno +FROM base as gno + +COPY ./gno /usr/bin/gno +COPY ./examples /gnoroot/examples/ +COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/ +COPY ./gnovm/tests/stdlibs /gnoroot/gnovm/tests/stdlibs/ + +ENTRYPOINT [ "/usr/bin/gno" ] From 7624048fe1763ed119f93bf0e62ed77c2c8ec042 Mon Sep 17 00:00:00 2001 From: albttx Date: Mon, 27 May 2024 19:56:04 +0100 Subject: [PATCH 3/3] chore: remove dockerfiles --- Dockerfile.gno.release | 14 -------------- Dockerfile.gnokey.release | 6 ------ Dockerfile.gnoland.release | 14 -------------- Dockerfile.gnoweb.release | 7 ------- 4 files changed, 41 deletions(-) delete mode 100644 Dockerfile.gno.release delete mode 100644 Dockerfile.gnokey.release delete mode 100644 Dockerfile.gnoland.release delete mode 100644 Dockerfile.gnoweb.release diff --git a/Dockerfile.gno.release b/Dockerfile.gno.release deleted file mode 100644 index a7f03dcb401..00000000000 --- a/Dockerfile.gno.release +++ /dev/null @@ -1,14 +0,0 @@ -FROM busybox - -COPY ./gno /usr/bin/gno -COPY ./examples /gnoroot/examples/ -COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/ -COPY ./gnovm/tests/stdlibs /gnoroot/gnovm/tests/stdlibs/ - -ENV GNOROOT="/gnoroot/" - -WORKDIR /gnoroot/ - -ENTRYPOINT [ "/usr/bin/gno" ] - -CMD [ "" ] diff --git a/Dockerfile.gnokey.release b/Dockerfile.gnokey.release deleted file mode 100644 index d4fa7a1cf66..00000000000 --- a/Dockerfile.gnokey.release +++ /dev/null @@ -1,6 +0,0 @@ -FROM busybox - -COPY ./gnokey /usr/bin/gnokey - -ENTRYPOINT [ "/usr/bin/gnokey" ] -CMD [ "" ] diff --git a/Dockerfile.gnoland.release b/Dockerfile.gnoland.release deleted file mode 100644 index de96a4130ff..00000000000 --- a/Dockerfile.gnoland.release +++ /dev/null @@ -1,14 +0,0 @@ -FROM busybox - -COPY ./gnoland /usr/bin/gnoland -COPY ./examples /gnoroot/examples/ -COPY ./gnovm/stdlibs /gnoroot/gnovm/stdlibs/ -COPY ./gno.land/genesis/genesis_balances.txt /gnoroot/gno.land/genesis/genesis_balances.txt -COPY ./gno.land/genesis/genesis_txs.jsonl /gnoroot/gno.land/genesis/genesis_txs.jsonl - -ENV GNOROOT="/gnoroot/" - -WORKDIR /gnoroot/ -EXPOSE 26656 26657 -ENTRYPOINT [ "/gnoland" ] -CMD [ "" ] diff --git a/Dockerfile.gnoweb.release b/Dockerfile.gnoweb.release deleted file mode 100644 index 28425eb128d..00000000000 --- a/Dockerfile.gnoweb.release +++ /dev/null @@ -1,7 +0,0 @@ -FROM busybox - -COPY ./gnoweb /usr/bin/gnoweb - -EXPOSE 8888 -ENTRYPOINT [ "/usr/bin/gnoweb" ] -CMD [ "" ]