-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b70ac4f
commit 7390e1f
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Dockerfile | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Build image ## | ||
FROM golang:1.18.3-alpine3.16 as build | ||
|
||
# System dependencies | ||
RUN apk add --no-cache make | ||
|
||
WORKDIR /usr/src/zgrab2 | ||
|
||
# Copy and cache deps | ||
COPY go.mod go.sum ./ | ||
RUN go mod download && go mod verify | ||
|
||
# Build the actual app | ||
COPY . . | ||
RUN make all | ||
|
||
## Runtime image ## | ||
FROM alpine:3.16 as run | ||
|
||
COPY --from=build /usr/src/zgrab2/cmd/zgrab2/zgrab2 /usr/bin/zgrab2 | ||
|
||
ENTRYPOINT ["/usr/bin/zgrab2"] |