2023-12-26 16:44:59 +01:00
|
|
|
FROM golang:1.21.5 AS builder
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o ssh-honeypot .
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
COPY --from=builder /app/ssh-honeypot .
|
|
|
|
|
2023-12-26 17:30:41 +01:00
|
|
|
RUN mkdir data
|
|
|
|
|
|
|
|
ENV PATH data/ssh-honeypot.log
|
|
|
|
ENV PORT 22
|
|
|
|
|
|
|
|
EXPOSE 22
|
|
|
|
VOLUME /app/data
|
|
|
|
|
2023-12-26 16:44:59 +01:00
|
|
|
ENTRYPOINT ["./ssh-honeypot"]
|