-
Notifications
You must be signed in to change notification settings - Fork 66
/
Copy pathDockerfile
41 lines (36 loc) · 1.18 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
FROM alpine:3.12
# TODO: Various optional modules are currently disabled (see output of ./configure):
# - Libwrap is disabled because tcpd.h is missing.
# - BSD Auth is disabled because bsd_auth.h is missing.
# - ...
RUN set -x \
# Runtime dependencies.
&& apk add --no-cache \
linux-pam \
# Build dependencies.
&& apk add --no-cache -t .build-deps \
build-base \
curl \
linux-pam-dev \
&& cd /tmp \
# https://www.inet.no/dante/download.html
&& curl -L https://www.inet.no/dante/files/dante-1.4.2.tar.gz | tar xz \
&& cd dante-* \
# See https://lists.alpinelinux.org/alpine-devel/3932.html
&& ac_cv_func_sched_setscheduler=no ./configure \
&& make install \
&& cd / \
# Add an unprivileged user.
&& adduser -S -D -u 8062 -H sockd \
# Install dumb-init (avoid PID 1 issues).
# https://github.com/Yelp/dumb-init
&& curl -Lo /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64 \
&& chmod +x /usr/local/bin/dumb-init \
# Clean up.
&& rm -rf /tmp/* \
&& apk del --purge .build-deps
# Default configuration
COPY sockd.conf /etc/
EXPOSE 1080
ENTRYPOINT ["dumb-init"]
CMD ["sockd"]