Skip to content

Commit

Permalink
add Dockerfile and build target
Browse files Browse the repository at this point in the history
  • Loading branch information
83bytes committed Jul 1, 2024
1 parent ecc88d1 commit fbededb
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM gcr.io/distroless/base-debian11

WORKDIR /

COPY ./alertmanager ./alertmanager

EXPOSE 8080

USER nonroot:nonroot

ENTRYPOINT ["./alertmanager"]
16 changes: 12 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
clean:
ALERTMANAGER_VERSION := $(shell ./alertmanager --version | cut -d" " -f3)

clean:
rm alertmanager

build:
go build
build: vet
go build -tags netgo

docker-build: build
docker build -t alertmanager:$(ALERTMANAGER_VERSION) -f Dockerfile .

test:
go test ./... -v
go test ./... -v

vet:
go vet ./...

0 comments on commit fbededb

Please sign in to comment.