generated from pre-cursor/github-template-repository-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (30 loc) · 1.21 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
FROM debian:buster-slim as build
RUN set -uex \
&& apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y gcc git gettext libidn11-dev make \
&& git clone https://github.com/rfc1036/whois.git \
&& cd whois && make && make install && cd ..
FROM debian:buster-slim AS release
ARG VERSION
LABEL "name"="tool-dockers/whois" \
"maintainer"="tool-dockers" \
"version"="${VERSION}" \
"release"="5.4.3" \
"vendor"="tool-dockers" \
"summary"="Docker containing whois" \
"description"="This package provides a commandline client for the WHOIS protocol, which queries online servers for information such as contact details for domains and IP address assignments."
ENV GROUP debian
ENV USER debian
RUN set -uex \
&& apt-get update -y \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libidn11 ntp \
&& apt-get -y autoremove --purge \
&& rm -rf /var/lib/apt/lists/* \
&& addgroup ${GROUP} \
&& adduser --system ${USER} \
&& usermod -a -G ${GROUP} ${USER}
COPY --from=build /usr/bin/whois /usr/bin/whois
COPY --from=build /usr/share/man/* /usr/share/man/
USER ${USER}
ENTRYPOINT [ "/usr/bin/whois" ]
CMD [ "--help" ]