tweaking, hardening

This commit is contained in:
t3chn0m4g3 2024-11-28 15:55:27 +01:00
parent 0a0f62405a
commit adefcca2fc
3 changed files with 4 additions and 4 deletions

View file

@ -11,7 +11,7 @@ RUN go get github.com/ua-parser/uap-go/uaparser
RUN go mod download RUN go mod download
RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot
# #
FROM alpine:3.20 FROM scratch
# #
COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot
COPY --from=builder /opt/go-pot/config.yml /opt/go-pot/config.yml COPY --from=builder /opt/go-pot/config.yml /opt/go-pot/config.yml

View file

@ -9,7 +9,7 @@ WORKDIR /opt/go-pot
# #
RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot RUN CGO_ENABLED=0 GOOS=linux go build -o /opt/go-pot/go-pot
# #
FROM alpine:3.20 FROM scratch
# #
COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot COPY --from=builder /opt/go-pot/go-pot /opt/go-pot/go-pot
COPY dist/config.yml /opt/go-pot/config.yml COPY dist/config.yml /opt/go-pot/config.yml

View file

@ -1,8 +1,8 @@
FROM golang:1.21-alpine AS builder FROM golang:1.23-alpine AS builder
WORKDIR /app WORKDIR /app
# #
RUN apk -U add git openssl RUN apk -U add git openssl
RUN git clone https://github.com/t3chn0m4g3/h0neytr4p -b v0.32 /app RUN git clone https://github.com/t3chn0m4g3/h0neytr4p -b v0.33 /app
RUN go mod download RUN go mod download
RUN go mod tidy RUN go mod tidy
RUN go build -o /app/main RUN go build -o /app/main