Skip to content

Commit

Permalink
Add docker support (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
creekorful authored Jan 24, 2023
1 parent b70ac4f commit 7390e1f
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Dockerfile

22 changes: 22 additions & 0 deletions Dockerfile
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"]

0 comments on commit 7390e1f

Please sign in to comment.