Skip to content

Commit

Permalink
Fix docker for goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
ostcar committed Sep 4, 2022
1 parent 5336fae commit 79faba2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 23 deletions.
12 changes: 11 additions & 1 deletion .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ archives:
386: i386
amd64: x86_64
dockers:
- image_templates:
image_templates:
- ghcr.io/openslides/openslides-performance
build_flag_templates:
- "--pull"
- "--label=org.opencontainers.image.created={{.Date}}"
- "--label=org.opencontainers.image.title={{.ProjectName}}"
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
- "--label=org.opencontainers.image.version={{.Version}}"
- "--label=org.opencontainers.image.licenses=MIT"
- "--label=org.opencontainers.image.source=https://github.com/OpenSlides/openslides-performance"
- "--build-arg=FOO={{.Env.Bar}}"
- "--platform=linux/arm64"
checksum:
name_template: 'checksums.txt'
snapshot:
Expand Down
23 changes: 1 addition & 22 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,3 @@
FROM golang:1.19.0-alpine as builder
WORKDIR /root/

RUN apk add git

COPY go.mod go.sum ./
RUN go mod download

COPY . .

RUN CGO_ENABLED=0 go build


# Productive build
FROM scratch

LABEL org.opencontainers.image.title="OpenSlides Performance Service"
LABEL org.opencontainers.image.description="Tool to test the performance of OpenSlides."
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.source="https://github.com/OpenSlides/openslides-performance"

COPY --from=builder /root/openslides-performance .

ENTRYPOINT ["/openslides-performance"]
COPY openslides-performance /

0 comments on commit 79faba2

Please sign in to comment.