-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (34 loc) · 1.03 KB
/
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
46
47
48
FROM alpine:latest
EXPOSE 80
WORKDIR /work
# Copy entrypoint script
COPY entrypoint.sh .
RUN chmod a+x entrypoint.sh
# Install packages
RUN apk update && apk add --no-cache unzip curl iproute2 jq ffmpeg && \
rm -rf /tmp/*
# Timezone
RUN apk update && apk add tzdata
ARG TZ "Europe/London"
ENV TZ=$TZ
RUN cp /usr/share/zoneinfo/Europe/London /etc/localtime
# Add crontab file to the cron directory
ADD crontab /etc/cron.d/cron
# Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/cron
# Install HLS Proxy
ARG version=8.4.8
RUN curl -O https://www.hls-proxy.com/downloads/$version/hls-proxy-$version.linux-x64.zip && \
unzip hls-proxy-$version.linux-x64.zip
RUN rm hls-proxy-$version.linux-x64.zip
# Give execution rights
RUN chmod a+x hls-proxy
# Set log file
RUN touch /var/log/hls-proxy.log
# Health check
COPY health.sh .
RUN chmod a+x health.sh
HEALTHCHECK --interval=60s --timeout=5s --retries=3 --start-period=90s \
CMD sh health.sh
# Run the command on container startup
ENTRYPOINT ["/work/entrypoint.sh"]