-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (31 loc) · 1.15 KB
/
Dockerfile
File metadata and controls
37 lines (31 loc) · 1.15 KB
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
# Does not build beyond alpine:3.20, may require upstream fixes for gcc15 and
# legacy C library functions eg fcvt, ecvt, and gcvt
FROM alpine:3.20
ENV XINETD_VERSION=2.3.15.4
RUN set -x \
&& cd /tmp \
&& apk --no-cache add s6 xz build-base \
&& wget "https://github.com/openSUSE/xinetd/releases/download/${XINETD_VERSION}/xinetd-${XINETD_VERSION}.tar.xz" \
&& tar -xf xinetd-${XINETD_VERSION}.tar.xz \
&& cd xinetd-${XINETD_VERSION} \
&& ./configure \
&& make \
&& make install \
&& install -m 0644 -D -t /etc/xinetd.d /tmp/xinetd-${XINETD_VERSION}/contrib/xinetd.d/* \
&& apk --no-cache del xz build-base \
&& cd / \
&& rm -rf /tmp/* \
;
COPY s6/ /etc/s6/
COPY xinetd.conf /etc/xinetd.conf
RUN set -x \
# Enable the services
&& sed -i 's/disable.*/disable\t\t= no/' /etc/xinetd.d/time /etc/xinetd.d/time-udp \
# Use same underprivileged user as xinetd daemon
&& sed -i 's/user.*/user\t\t= 1000/' /etc/xinetd.d/time /etc/xinetd.d/time-udp \
# List the UDP service: "2 available services"
&& sed -i 's/\ttype.*/\ttype\t\t= INTERNAL/' /etc/xinetd.d/time /etc/xinetd.d/time-udp \
;
EXPOSE 37/tcp
EXPOSE 37/udp
CMD ["s6-svscan","/etc/s6"]