From cabc5dad9ca446d43c39be3f1f7767543d07f74c Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Fri, 13 Jul 2018 19:23:01 -0400 Subject: [PATCH] change masscan to alpine Signed-off-by: Jess Frazelle --- k8scan/Dockerfile | 2 +- latest-versions.sh | 1 + masscan/Dockerfile | 29 +++++++++++++++-------------- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/k8scan/Dockerfile b/k8scan/Dockerfile index 045b694..90ada40 100644 --- a/k8scan/Dockerfile +++ b/k8scan/Dockerfile @@ -31,7 +31,7 @@ RUN set -x \ && CGO_ENABLED=0 go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o /usr/bin/k8scan *.go \ && echo "Build complete." -FROM scratch +FROM r.j3ss.co/masscan COPY --from=builder /usr/bin/k8scan /usr/bin/k8scan COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs diff --git a/latest-versions.sh b/latest-versions.sh index 2ea351a..ef92016 100755 --- a/latest-versions.sh +++ b/latest-versions.sh @@ -107,6 +107,7 @@ google/guetzli irssi/irssi cryptodotis/irssi-otr keepassxreboot/keepassxc +robertdavidgraham/masscan zyedidia/micro bitly/oauth2_proxy Tautulli/Tautulli diff --git a/masscan/Dockerfile b/masscan/Dockerfile index 0ed6a48..9e893df 100644 --- a/masscan/Dockerfile +++ b/masscan/Dockerfile @@ -1,26 +1,27 @@ -FROM debian:sid +FROM alpine:latest LABEL maintainer "Jessie Frazelle " -RUN apt-get update && apt-get install -y \ +RUN apk add --no-cache \ ca-certificates \ - libpcap-dev \ - --no-install-recommends \ - && rm -rf /var/lib/apt/lists/* + libpcap-dev -RUN buildDeps=' \ +ENV MASSCAN_VERSION 1.0.5 + +RUN set -x \ + && apk add --no-cache --virtual .build-deps \ + build-base \ clang \ - gcc \ + clang-dev \ git \ - make \ - ' \ - && set -x \ - && apt-get update && apt-get install -y $buildDeps --no-install-recommends \ + linux-headers \ && rm -rf /var/lib/apt/lists/* \ - && git clone --depth 1 https://github.com/robertdavidgraham/masscan.git /usr/src/masscan \ - && cd /usr/src/masscan \ + && git clone --depth 1 --branch "$MASSCAN_VERSION" https://github.com/robertdavidgraham/masscan.git /usr/src/masscan \ + && ( \ + cd /usr/src/masscan \ && make \ && make install \ + ) \ && rm -rf /usr/src/masscan \ - && apt-get purge -y --auto-remove $buildDeps + && apk del .build-deps ENTRYPOINT [ "masscan" ]