FROM docker.io/golang:1.22 AS build WORKDIR /src COPY go.* /src/ RUN go mod download COPY * /src/ RUN CGO_ENABLED=0 go build -o /sshlog . # Final image FROM scratch COPY --from=build /sshlog / ENTRYPOINT ["/sshlog", "-p", "2222", "-4"] EXPOSE 2222