generated from fallion/go-template
-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Dockerfile
34 lines (24 loc) · 902 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM golang:1.21.4-alpine as builder
RUN mkdir /app
WORKDIR /app
RUN apk add --no-cache make git gcc musl-dev
# This step is done separately than `COPY . /app/` in order to
# cache dependencies.
COPY go.mod go.sum Makefile /app/
RUN go mod download
COPY . /app/
RUN make build/docker
FROM alpine:3.18.4
LABEL repository="https://github.com/aevea/commitsar"
LABEL homepage="https://github.com/aevea/commitsar"
LABEL maintainer="Simon Prochazka <[email protected]>"
LABEL com.github.actions.name="Commitsar Action"
LABEL com.github.actions.description="Check commit message compliance with conventional commits"
LABEL com.github.actions.icon="code"
LABEL com.github.actions.color="blue"
RUN apk add --no-cache --virtual=.run-deps ca-certificates git &&\
mkdir /app
WORKDIR /app
COPY --from=builder /app/build/commitsar ./commitsar
RUN ln -s $PWD/commitsar /usr/local/bin
CMD ["commitsar"]