2024-01-18 07:16:20 +08:00
|
|
|
FROM golang:alpine AS builder
|
|
|
|
|
|
|
|
ARG VERSION
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN go mod tidy
|
|
|
|
RUN go build -trimpath -ldflags="-s -w \
|
|
|
|
-X 'github.com/thank243/iptvChannel/config.date=$(date -Iseconds)' \
|
|
|
|
-X 'github.com/thank243/iptvChannel/config.version=$VERSION' \
|
|
|
|
" -v -o iptvChannel main.go
|
|
|
|
|
2024-01-05 08:47:10 +08:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
RUN apk update --no-cache && apk add --no-cache ca-certificates tzdata
|
|
|
|
ENV TZ Asia/Shanghai
|
|
|
|
|
|
|
|
WORKDIR /app
|
2024-01-18 07:16:20 +08:00
|
|
|
COPY --from=builder /build/iptvChannel /app/iptvChannel
|
2024-01-15 23:17:19 +08:00
|
|
|
ENTRYPOINT ["/app/iptvChannel"]
|