1
0
Fork 0
hats/Dockerfile

18 lines
397 B
Docker
Raw Normal View History

2023-10-12 17:23:35 +00:00
FROM golang:1 as builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . ./
RUN CGO_ENABLED=0 GOOS=linux go build -o /hats
2024-01-08 21:47:35 +00:00
RUN CGO_ENABLED=0 GOOS=linux go build -o /healthcheck ./cmd/healthcheck/main.go
2023-10-12 17:23:35 +00:00
FROM builder as tester
RUN go test -v
FROM scratch
COPY --from=builder --chmod=755 /hats /hats
2024-01-08 21:47:35 +00:00
COPY --from=builder --chmod=755 /healthcheck /healthcheck
2023-10-12 17:23:35 +00:00
ENTRYPOINT [ "/hats" ]