Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
chore: update dockerfile for ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
soulteary committed Apr 4, 2024
1 parent ef782a8 commit e5cc1bb
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
17 changes: 9 additions & 8 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ builds:
id: macos
goos: [darwin]
goarch: [amd64, arm64]
main: ./bin

- <<: *build_defaults
id: linux
Expand All @@ -22,7 +23,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-amd64-{{ .Tag }}"
- "soulteary/webhook:linux-amd64"
dockerfile: docker/Dockerfile.gorelease
dockerfile: docker/goreleaser/Dockerfile
use: buildx
goarch: amd64
build_flag_templates:
Expand All @@ -40,7 +41,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-arm64-{{ .Tag }}"
- "soulteary/webhook:linux-arm64"
dockerfile: docker/Dockerfile.gorelease
dockerfile: docker/goreleaser/Dockerfile
use: buildx
goos: linux
goarch: arm64
Expand All @@ -60,7 +61,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-armv7-{{ .Tag }}"
- "soulteary/webhook:linux-armv7"
dockerfile: docker/Dockerfile.gorelease
dockerfile: docker/goreleaser/Dockerfile
use: buildx
goos: linux
goarch: arm
Expand All @@ -80,7 +81,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-armv6-{{ .Tag }}"
- "soulteary/webhook:linux-armv6"
dockerfile: docker/Dockerfile.gorelease
dockerfile: docker/goreleaser/Dockerfile
use: buildx
goos: linux
goarch: arm
Expand All @@ -100,7 +101,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-amd64-extend-{{ .Tag }}"
- "soulteary/webhook:linux-amd64-extend"
dockerfile: docker/Dockerfile.gorelease-extend
dockerfile: docker/goreleaser/Dockerfile.extend
use: buildx
goarch: amd64
build_flag_templates:
Expand All @@ -118,7 +119,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-arm64-extend-{{ .Tag }}"
- "soulteary/webhook:linux-arm64-extend"
dockerfile: docker/Dockerfile.gorelease-extend
dockerfile: docker/goreleaser/Dockerfile.extend
use: buildx
goos: linux
goarch: arm64
Expand All @@ -138,7 +139,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-armv7-extend-{{ .Tag }}"
- "soulteary/webhook:linux-armv7-extend"
dockerfile: docker/Dockerfile.gorelease-extend
dockerfile: docker/goreleaser/Dockerfile.extend
use: buildx
goos: linux
goarch: arm
Expand All @@ -158,7 +159,7 @@ dockers:
- image_templates:
- "soulteary/webhook:linux-armv6-extend-{{ .Tag }}"
- "soulteary/webhook:linux-armv6-extend"
dockerfile: docker/Dockerfile.gorelease-extend
dockerfile: docker/goreleaser/Dockerfile.extend
use: buildx
goos: linux
goarch: arm
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docker/Dockerfile → docker/manual/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ENV CGO_ENABLED=0
WORKDIR /app
COPY . .
RUN go mod download -x
RUN go build -ldflags "-w -s" -o webhook
RUN go build -ldflags "-w -s" -o webhook ./bin

FROM debian:stretch
LABEL maintainer "soulteary <soulteary@gmail.com>"
COPY --from=builder /app/webhook /bin/
CMD webhook
CMD webhook
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ENV CGO_ENABLED=0
WORKDIR /app
COPY . .
RUN go mod download -x
RUN go build -ldflags "-w -s" -o webhook
RUN go build -ldflags "-w -s" -o webhook ./bin
RUN upx -9 -o webhook.minify webhook && \
chmod +x webhook.minify

Expand Down

0 comments on commit e5cc1bb

Please sign in to comment.