endlessh-go/Dockerfile
Ivan Schaller a112241c76
make wanted changes
Signed-off-by: Ivan Schaller <ivan@schaller.sh>
2023-04-17 17:06:42 +02:00

20 lines
495 B
Docker

FROM golang AS build
RUN mkdir /endlessh
ADD . /endlessh
WORKDIR /endlessh
RUN go mod tidy
RUN go build -o endlessh .
FROM gcr.io/distroless/base
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
COPY --from=build /endlessh/endlessh /endlessh
EXPOSE 2222 2112
USER nobody
ENTRYPOINT ["/endlessh"]
CMD ["-logtostderr", "-v=1"]