Files
endlessh-go/Dockerfile

21 lines
509 B
Docker
Raw Normal View History

2022-10-10 20:06:59 -07:00
FROM golang AS build
2021-10-26 21:33:55 -07:00
2022-10-12 18:46:37 -07:00
RUN mkdir /endlessh
ADD . /endlessh
WORKDIR /endlessh
2021-10-26 21:33:55 -07:00
RUN go mod tidy
2023-06-25 23:32:15 -07:00
RUN CGO_ENABLED=0 go build -o endlessh .
2021-10-26 21:33:55 -07:00
2022-10-12 18:46:37 -07:00
FROM gcr.io/distroless/base
2021-10-26 21:33:55 -07:00
LABEL org.opencontainers.image.title=endlessh-go
LABEL org.opencontainers.image.description="Endlessh: an SSH tarpit"
LABEL org.opencontainers.image.vendor="Shizun Ge"
LABEL org.opencontainers.image.licenses=GPLv3
2022-10-12 18:46:37 -07:00
COPY --from=build /endlessh/endlessh /endlessh
2021-10-26 21:33:55 -07:00
EXPOSE 2222 2112
USER nobody
2022-10-12 18:46:37 -07:00
ENTRYPOINT ["/endlessh"]
2021-10-26 21:33:55 -07:00
CMD ["-logtostderr", "-v=1"]