diff --git a/Dockerfile b/Dockerfile index db9e867e1..72361a99c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,16 @@ -FROM golang:1.20.2-alpine as build-env +# Build +FROM golang:1.20.1-alpine AS build-env RUN apk add build-base -RUN go install -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei@latest +WORKDIR /app +COPY . /app +WORKDIR /app/v2 +RUN go mod download +RUN go build ./cmd/nuclei +# Release FROM alpine:3.17.2 -RUN apk add --no-cache bind-tools ca-certificates chromium -COPY --from=build-env /go/bin/nuclei /usr/local/bin/nuclei -ENTRYPOINT ["nuclei"] +RUN apk -U upgrade --no-cache \ + && apk add --no-cache bind-tools chromium ca-certificates +COPY --from=build-env /app/v2/nuclei /usr/local/bin/ + +ENTRYPOINT ["nuclei"] \ No newline at end of file diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 5605f4d49..000000000 --- a/sonar-project.properties +++ /dev/null @@ -1,17 +0,0 @@ -sonar.projectKey=projectdiscovery_nuclei -sonar.organization=projectdiscovery - -# This is the name and version displayed in the SonarCloud UI. -#sonar.projectName=dnsx -#sonar.projectVersion=1.0 - -# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows. -sonar.sources=v2/ -sonar.tests=v2/ -sonar.test.inclusions=**/*_test.go -sonar.exclusions=v2/pkg/protocols/common/helpers/deserialization/testdata/*.java -sonar.go.coverage.reportPaths=v2/cov.out -sonar.externalIssuesReportPaths=v2/report.json - -# Encoding of the source code. Default is default system encoding -#sonar.sourceEncoding=UTF-8 \ No newline at end of file diff --git a/v2/.goreleaser.yml b/v2/.goreleaser.yml index 0e59a522c..c580d43c4 100644 --- a/v2/.goreleaser.yml +++ b/v2/.goreleaser.yml @@ -2,14 +2,7 @@ before: hooks: - go mod tidy -# release options (https://goreleaser.com/customization/release/) - -release: - draft: true - prerelease: auto - builds: - - main: cmd/nuclei/main.go binary: nuclei id: nuclei-cli @@ -60,7 +53,7 @@ announce: enabled: true channel: '#release' username: GoReleaser - message_template: '**New Release: {{ .ProjectName }} {{.Tag}}** is published! Check it out at {{ .ReleaseURL }}' + message_template: 'New Release: {{ .ProjectName }} {{.Tag}} is published! Check it out at {{ .ReleaseURL }}' discord: enabled: true