From d375b1e7ebec71e07633c847b5ff8ec1d0025fbc Mon Sep 17 00:00:00 2001 From: Brendan O'Leary Date: Fri, 24 Feb 2023 21:45:59 +0000 Subject: [PATCH 1/2] Build from source in Docker --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f8146ee9f..b1392f651 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,16 @@ FROM golang:1.20.1-alpine AS build-env RUN apk add build-base -RUN go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest +WORKDIR /app +COPY . /app +WORKDIR /app/v2 +RUN go mod download +RUN go build ./cmd/subfinder # Release FROM alpine:3.17.2 RUN apk -U upgrade --no-cache \ && apk add --no-cache bind-tools ca-certificates -COPY --from=build-env /go/bin/subfinder /usr/local/bin/subfinder +COPY --from=build-env /app/v2/subfinder /usr/local/bin/subfinder ENTRYPOINT ["subfinder"] From b83fd12d0f1b9cdffe38b2b8cad31488f124075a Mon Sep 17 00:00:00 2001 From: sandeep <8293321+ehsandeep@users.noreply.github.com> Date: Thu, 2 Mar 2023 18:45:25 +0530 Subject: [PATCH 2/2] Update installation requirement to go1.19 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e9cff115..4686aa8cd 100644 --- a/README.md +++ b/README.md @@ -106,7 +106,7 @@ OPTIMIZATION: # Installation -`subfinder` requires **go1.18** to install successfully. Run the following command to install the latest version: +`subfinder` requires **go1.19** to install successfully. Run the following command to install the latest version: ```sh go install -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder@latest