iptvChannel/Dockerfile

21 lines
505 B
Docker
Raw Normal View History

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
COPY --from=builder /build/iptvChannel /app/iptvChannel
ENTRYPOINT ["/app/iptvChannel"]