-
Notifications
You must be signed in to change notification settings - Fork 34
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
4b4fb0b
commit 6ea9d47
Showing
2 changed files
with
42 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,24 @@ | ||
FROM golang:1.20 as build | ||
WORKDIR /go/src/app | ||
|
||
COPY go.* . | ||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN go vet -v ./... | ||
RUN go test -v ./... | ||
RUN \ | ||
CGO_ENABLED=0 \ | ||
VERSION=`git tag --sort=-version:refname | head -n 1` \ | ||
go build -trimpath \ | ||
-ldflags "-s -w -X main.version=$VERSION" \ | ||
cmd/HellPot/*.go | ||
|
||
|
||
FROM gcr.io/distroless/static-debian11 | ||
|
||
COPY --from=build /go/src/app/HellPot /app | ||
COPY --from=build /go/src/app/docker_config.toml /config | ||
EXPOSE 8080 | ||
ENTRYPOINT ["/app", "-c", "/config"] |
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,18 @@ | ||
[deception] | ||
server_name = "nginx" | ||
|
||
[http] | ||
bind_addr = "0.0.0.0" | ||
bind_port = "8080" | ||
real_ip_header = 'X-Real-IP' | ||
uagent_string_blacklist = ["Cloudflare-Traffic-Manager", "curl"] | ||
|
||
[http.router] | ||
catchall = true # /robots.txt assumed to be served elsewhence | ||
|
||
[logger] | ||
debug = false | ||
trace = false | ||
directory = "/logs/" | ||
nocolor = true | ||
use_date_filename = true |