forked from Gitlink/gitlink-cli
14 lines
365 B
Docker
14 lines
365 B
Docker
FROM golang:1.26-alpine AS builder
|
|
ENV GOPROXY=https://goproxy.cn,direct
|
|
WORKDIR /app
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
COPY . .
|
|
RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o gitlink-cli .
|
|
|
|
FROM alpine:latest
|
|
RUN apk --no-cache add ca-certificates git
|
|
WORKDIR /app
|
|
COPY --from=builder /app/gitlink-cli /usr/local/bin/gitlink-cli
|
|
ENTRYPOINT ["gitlink-cli"]
|