forked from synctv-org/synctv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
45 lines (27 loc) · 864 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM golang:1.23-alpine AS builder
ARG VERSION=dev
ARG SKIP_INIT_WEB
ENV SKIP_INIT_WEB=${SKIP_INIT_WEB}
WORKDIR /synctv
COPY ./ ./
RUN apk add --no-cache bash curl git g++
RUN curl -sL \
https://raw.githubusercontent.com/zijiren233/go-build-action/refs/tags/v1/build.sh | \
bash -s -- \
--version=${VERSION} \
--bin-name-no-suffix \
--force-gcc='gcc -static --static' \
--force-gxx='g++ -static --static'
FROM alpine:latest
ENV PUID=0 PGID=0 UMASK=022
COPY --from=builder /synctv/build/synctv /usr/local/bin/synctv
RUN apk add --no-cache bash ca-certificates su-exec tzdata && \
rm -rf /var/cache/apk/*
COPY script/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh && \
mkdir -p /root/.synctv
WORKDIR /root/.synctv
EXPOSE 8080/tcp
VOLUME [ "/root/.synctv" ]
ENTRYPOINT [ "/entrypoint.sh" ]
CMD [ "server" ]