-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathdebian.dockerfile
76 lines (64 loc) · 1.86 KB
/
debian.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
FROM debian:bullseye-slim@sha256:6344a6747740d465bff88e833e43ef881a8c4dd51950dba5b30664c93f74cbef as builder
ARG VERSION
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
automake \
build-essential \
ca-certificates \
git \
libtool \
make \
pkg-config \
# Icecast
libcurl4-openssl-dev \
libogg-dev \
libspeex-dev \
libssl-dev \
libtheora-dev \
libvorbis-dev \
libxml2-dev \
libxslt1-dev \
&& rm -rf /var/lib/apt/lists/*
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 debian:bullseye-slim@sha256:6344a6747740d465bff88e833e43ef881a8c4dd51950dba5b30664c93f74cbef
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
media-types \
libcurl4 \
libogg0 \
libspeex1 \
libssl1.1 \
libtheora0 \
libvorbis0a \
libxml2 \
libxslt1.1 \
&& rm -rf \
/var/cache/* \
/var/lib/apt/lists/* \
/var/log/apt/* \
/var/log/dpkg.log
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"]