Skip to content

Commit

Permalink
Add initial support for docker
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilsbhat committed Jun 14, 2022
1 parent a878dec commit 7a217e8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ builds:
ldflags:
- -s -w -X github.com/nikhilsbhat/gocd-prometheus-exporter/version.Version={{.Version}} -X github.com/nikhilsbhat/gocd-prometheus-exporter/version.Env={{.Env.BUILD_ENVIRONMENT}} -X github.com/nikhilsbhat/gocd-prometheus-exporter/version.BuildDate={{.Date}} -X github.com/nikhilsbhat/gocd-prometheus-exporter/version.Revision={{.Commit}} -X github.com/nikhilsbhat/gocd-prometheus-exporter/version.GoVersion={{.Env.GOVERSION}} -X github.com/nikhilsbhat/gocd-prometheus-exporter/version.Platform={{ .Os }}/{{ .Arch }}

dockers:
- goos: linux
goarch: amd64
ids:
- gocd-prometheus-exporter
skip_push: false
image_templates:
- "basnik/gocd-prometheus-exporter:latest"
- "basnik/gocd-prometheus-exporter:{{ .Tag }}"
- "basnik/gocd-prometheus-exporter:{{ .Tag }}-{{ .Env.GOVERSION }}"
dockerfile: Dockerfile

archives:
- format: 'tar.gz'
replacements:
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
### Description: Dockerfile for gocd-prometheus-exporter
FROM alpine:3.16

COPY gocd-prometheus-exporter /

# Starting
ENTRYPOINT [ "/gocd-prometheus-exporter" ]

0 comments on commit 7a217e8

Please sign in to comment.