20 lines
No EOL
512 B
Docker
20 lines
No EOL
512 B
Docker
FROM docker.io/golang:alpine AS build
|
|
LABEL authors="estym"
|
|
|
|
RUN apk add --no-cache gcc musl-dev ca-certificates git
|
|
RUN go install github.com/a-h/templ/cmd/templ@v0.3.833
|
|
|
|
|
|
RUN mkdir /app
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
RUN templ generate
|
|
RUN go install -ldflags='-s -w -extldflags "-static"' .
|
|
|
|
|
|
FROM scratch
|
|
COPY --from=build /go/bin/sonarqube-badge /usr/local/bin/sonarqube-badge
|
|
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
ENTRYPOINT ["/usr/local/bin/sonarqube-badge"] |