iptvChannel/Dockerfile
Senis e4c79cd316
Refactor API structure and split IPTV providers
The project structure has been refactored to separate each IPTV provider into its individual module. Also, created a clear interface for the API client. This greatly improves code readability and maintainability by separating concerns based on the provider. Now, it is easier to add or modify a provider. Additionally, the API client interface ensures a standard way to interact with different providers.

Refactor GitHub workflow and add snapshot workflow

In the `release.yml` workflow, `workflow_dispatch` has been removed as it's redundant. Meanwhile, a new file `snapshot.yml` has been added to handle the creation and uploading of snapshots. This workflow includes steps for setup, go releaser and uploading the assets.
2024-01-19 17:46:28 +08:00

21 lines
505 B
Docker

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
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"]