-
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
21 lines (17 loc) · 893 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ARG VERSION
## ================================================================================================
## Builder Stage -> creating the binary
## ================================================================================================
FROM golang:1.22.3-alpine3.18 as builder
ARG VERSION
WORKDIR /build
COPY . .
RUN go build -ldflags="-s -w -X github.com/budimanjojo/talhelper/v3/cmd.version=${VERSION}" -o /usr/local/bin/talhelper
## ================================================================================================
## Serving/Production Stage
## ================================================================================================
FROM scratch
COPY --from=builder /usr/local/bin/talhelper /usr/local/bin/talhelper
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /config
ENTRYPOINT [ "/usr/local/bin/talhelper" ]