-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 1.09 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
FROM alpine:latest as build
WORKDIR /tmp
RUN apk add --no-cache --update --virtual .wget wget \
&& wget https://github.com/rfc1036/whois/archive/next.zip --no-check-certificate \
&& unzip /tmp/next.zip && rm -rf /tmp/next.zip && apk del .wget
WORKDIR /tmp/whois-next
ENV LIBS="-L/usr/lib -lintl"
RUN apk add --no-cache --update build-base wget perl unzip gettext-dev
RUN make CFLAGS="-DHAVE_GETOPT_LONG -DHAVE_GETADDRINFO -DHAVE_SHA_CRYPT" \
&& make install && cd /tmp \
&& rm -rf /tmp/whois-next
RUN grep "whois" /etc/services > /tmp/services
FROM scratch as whois
COPY --from=build /usr/bin/whois /usr/local/bin/whois
COPY --from=build /usr/lib/libintl.so.8 /usr/lib/libintl.so.8
COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=build /tmp/services /etc/services
ENTRYPOINT ["/usr/local/bin/whois"]
FROM scratch as mkpasswd
COPY --from=build /usr/bin/mkpasswd /usr/local/bin/mkpasswd
COPY --from=build /usr/lib/libintl.so.8 /usr/lib/libintl.so.8
COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
ENTRYPOINT ["/usr/local/bin/mkpasswd"]