We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 371757d commit 0eb90c4Copy full SHA for 0eb90c4
1 file changed
Dockerfile
@@ -1,16 +1,21 @@
1
FROM golang:1.26.3-alpine AS builder
2
3
+RUN apk add --no-cache tzdata
4
+
5
WORKDIR /src
6
COPY go.mod go.sum ./
7
RUN go mod download
8
9
COPY . .
-ARG VERSION=dev
-RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w -X 'github.com/GrayCodeAI/tok/internal/version.Version=${VERSION}'" -o /tok ./cmd/tok/
10
+RUN CGO_ENABLED=0 go build -trimpath ./...
11
12
FROM alpine:3.21
-RUN apk add --no-cache ca-certificates git
13
-COPY --from=builder /tok /usr/local/bin/tok
+RUN apk add --no-cache ca-certificates git tini && \
14
+ adduser -D -u 1000 tok
15
16
+COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
17
-ENTRYPOINT ["tok"]
-CMD ["--help"]
18
+USER tok
19
+WORKDIR /workspace
20
+ENTRYPOINT ["tini", "--"]
21
+CMD ["sleep", "infinity"]
0 commit comments