-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
executable file
·79 lines (64 loc) · 2.31 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
FROM alpine:3.21 as builder
ARG ICECAST_VERSION="2.4.4" \
SHA256="49b5979f9f614140b6a38046154203ee28218d8fc549888596a683ad604e4d44"
RUN apk update && \
apk upgrade && \
apk add --upgrade --no-cache --virtual=build-dependencies \
build-base \
coreutils \
curl-dev \
libxslt-dev \
libxml2-dev \
libogg-dev \
libvorbis-dev \
libtheora-dev \
speex-dev \
openssl-dev
WORKDIR /build
RUN wget https://downloads.xiph.org/releases/icecast/icecast-$ICECAST_VERSION.tar.gz -O /build/icecast-$ICECAST_VERSION.tar.gz && \
# NOTE: due to a bug SHA512SUMS file provide only beta SHA512SUM so we can not verify the download
# thank to tbr who help me to find the original sha256"
# wget https://downloads.xiph.org/releases/icecast/SHA512SUMS.txt -O /build/SHA512SUMS.txt && \
# sha512sum --ignore-missing --check SHA512SUMS.txt && \
echo "$SHA256 /build/icecast-$ICECAST_VERSION.tar.gz" | sha256sum -c - && \
tar -xvf icecast-$ICECAST_VERSION.tar.gz -C .
WORKDIR /build/icecast-$ICECAST_VERSION
RUN ./configure \
--prefix=/usr \
--localstatedir=/var \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info \
--with-curl
RUN make check
RUN make install DESTDIR=/build/output
FROM alpine:3.21
LABEL name="docker-icecast" \
maintainer="Jee [email protected]" \
description="Icecast is free server software for streaming multimedia." \
url="https://icecast.org" \
org.label-schema.vcs-url="https://github.com/jee-r/docker-icecast" \
org.opencontainers.image.source="https://github.com/jee-r/docker-icecast"
COPY rootfs /
RUN apk update && \
apk upgrade && \
apk add --upgrade --no-cache --virtual=base \
curl \
libxslt \
libxml2 \
libogg \
libvorbis \
libtheora \
speex \
openssl \
mailcap \
tzdata && \
chmod -R 777 /config && \
rm -rf /tmp/*
COPY --from=builder /build/output /
EXPOSE 8000
WORKDIR /config
HEALTHCHECK --interval=1m --timeout=10s --start-period=30s --retries=5 \
CMD curl --fail --silent --show-error --output /dev/null --write-out "%{http_code}" http://127.0.0.1:8000/status-json.xsl || exit 1
STOPSIGNAL SIGQUIT
ENTRYPOINT ["icecast", "-c", "/config/icecast.xml"]