use distroless as base
This commit is contained in:
parent
5e4c3bb21a
commit
46e5a624be
1 changed files with 6 additions and 5 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -1,19 +1,20 @@
|
|||
FROM golang AS build
|
||||
|
||||
ADD . /go/src/app
|
||||
WORKDIR /go/src/app
|
||||
RUN mkdir /endlessh
|
||||
ADD . /endlessh
|
||||
WORKDIR /endlessh
|
||||
RUN go mod tidy
|
||||
RUN go build -o endlessh .
|
||||
|
||||
FROM alpine:latest
|
||||
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 /go/src/app/endlessh /usr/bin/endlessh
|
||||
COPY --from=build /endlessh/endlessh /endlessh
|
||||
EXPOSE 2222 2112
|
||||
USER nobody
|
||||
ENTRYPOINT ["/usr/bin/endlessh"]
|
||||
ENTRYPOINT ["/endlessh"]
|
||||
CMD ["-logtostderr", "-v=1"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue