Merge pull request #83 from rotemreiss/support-docker

Add Docker support
dev
Mzack9999 2020-05-19 19:32:26 +02:00 committed by GitHub
commit d55abdacde
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

10
Dockerfile Normal file
View File

@ -0,0 +1,10 @@
FROM golang:1.13.11-alpine3.10 AS build-env
RUN apk add --no-cache --upgrade git openssh-client ca-certificates
RUN go get -u github.com/golang/dep/cmd/dep
WORKDIR /go/src/app
# Install
RUN go get -u github.com/projectdiscovery/nuclei/cmd/nuclei
ENTRYPOINT ["nuclei"]

View File

@ -20,6 +20,7 @@ We have also [open-sourced a dedicated repository](https://github.com/projectdis
- [Installation Instructions](#installation-instructions)
- [From Binary](#from-binary)
- [From Source](#from-source)
- [Running in a Docker Container](#running-in-a-docker-container)
- [Running nuclei](#running-nuclei)
- [1. Running nuclei with a single template.](#1-running-nuclei-with-a-single-template)
- [2. Running nuclei with multiple templates.](#2-running-nuclei-with-multiple-templates)
@ -86,6 +87,25 @@ nuclei requires go1.13+ to install successfully. Run the following command to ge
In order to update the tool, you can use -u flag with `go get` command.
### Running in a Docker Container
- Clone the repo using `git clone https://github.com/projectdiscovery/nuclei.git`
- Build your docker container
```bash
> docker build -t projectdiscovery/nuclei .
```
- After building the container using either way, run the following:
```bash
> docker run -it projectdiscovery/nuclei
```
For example, this will run the tool against all the hosts in `urls.txt` and output the results to your host file system:
```bash
> cat urls.txt | docker run -v /path-to-nuclei-templates:/go/src/app/ -i projectdiscovery/nuclei -t ./files/git-config.yaml > results.txt
```
Remember to change `/path-to-nuclei-templates` to the real path on your host file system.
# Running nuclei
### 1. Running nuclei with a single template.