sub / Dockerfile
gdtiti's picture
Update Dockerfile
97864bd verified
raw
history blame contribute delete
546 Bytes
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata redis wget bash
ARG VERSION=0.1.114
WORKDIR /app
RUN wget -qO /tmp/sub2api.tar.gz "https://github.com/Wei-Shaw/sub2api/releases/download/v${VERSION}/sub2api_${VERSION}_linux_amd64.tar.gz" \
&& tar xzf /tmp/sub2api.tar.gz -C /usr/local/bin/ \
&& rm /tmp/sub2api.tar.gz \
&& mv /usr/local/bin/sub2api /app/sub \
&& chmod +x /app/sub
RUN mkdir -p /app/data /app/resources
COPY start.sh /app/start.sh
RUN chmod +x /app/start.sh
EXPOSE 7860
CMD ["/app/start.sh"]