Skip to content

Commit

Permalink
Add docker support
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Dec 29, 2021
1 parent ece2ee3 commit 7606e3f
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM golang:1.17-bullseye
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . ./
RUN GOOS=linux go build -o /scan4log4shell
ENTRYPOINT ["/scan4log4shell"]
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ test:
build:
@go build -o scan4log4shell .

.PHOMY: docker-build
## docker-build: Build a docker image
docker-build:
docker build -t scan4log4shell .

.PHONY: run
run:
@go run *.go remote url -h
Expand Down
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,16 @@ make build

(Add the appropriate .exe extension on Windows systems, of course.)

## Docker Support
```bash
git clone https://github.com/hupe1980/scan4log4shell
cd scan4log4shell
make docker-build

# Scan the current working directory
docker run -it --rm -v $PWD:/data scan4log4shell local /data
```

## Usage
```console
Usage:
Expand Down

0 comments on commit 7606e3f

Please sign in to comment.