-
Notifications
You must be signed in to change notification settings - Fork 12
/
alpine.dockerfile
60 lines (48 loc) · 1.32 KB
/
alpine.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
FROM alpine:3.20@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a as builder
ARG VERSION
RUN apk --no-cache add \
build-base \
# Icecast
curl-dev \
libogg-dev \
libtheora-dev \
libvorbis-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \
speex-dev
WORKDIR /build
ADD icecast-$VERSION.tar.gz .
RUN if test ! -d icecast-$VERSION; then mv icecast-* icecast-$VERSION; fi
WORKDIR /build/icecast-$VERSION
RUN ./configure \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var
RUN make
RUN make install DESTDIR=/build/output
FROM alpine:3.20@sha256:1e42bbe2508154c9126d48c2b8a75420c3544343bf86fd041fb7527e017a4b4a
RUN apk --no-cache add \
libcurl \
libogg \
libtheora \
libvorbis \
libxml2 \
libxslt \
openssl \
speex
ENV USER=icecast
RUN adduser --disabled-password --gecos '' --no-create-home $USER
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint
COPY xml-edit.sh /usr/local/bin/xml-edit
RUN chmod +x \
/usr/local/bin/docker-entrypoint \
/usr/local/bin/xml-edit
COPY --from=builder /build/output /
RUN xml-edit errorlog - /etc/icecast.xml
RUN mkdir -p /var/log/icecast && \
chown $USER /etc/icecast.xml /var/log/icecast
EXPOSE 8000
ENTRYPOINT ["docker-entrypoint"]
USER $USER
CMD ["icecast", "-c", "/etc/icecast.xml"]