2023-11-21 18:55:04 +03:00
|
|
|
FROM golang:1.21-alpine AS builder
|
|
|
|
WORKDIR /app
|
|
|
|
COPY ./ ./
|
|
|
|
RUN set -eux; \
|
|
|
|
apk add --no-cache bash make git protoc protobuf-dev dumb-init mailcap ca-certificates tzdata; \
|
|
|
|
update-ca-certificates; \
|
2023-11-22 23:31:35 +03:00
|
|
|
make generate build
|
2023-11-21 18:55:04 +03:00
|
|
|
|
|
|
|
FROM scratch
|
|
|
|
WORKDIR /
|
|
|
|
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
|
|
|
|
COPY --from=builder /etc/mime.types /etc/mime.types
|
|
|
|
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
|
|
|
|
COPY --from=builder /usr/bin/dumb-init /bin/dumb-init
|
|
|
|
COPY --from=builder /app/build/sshpoke /sshpoke
|
|
|
|
EXPOSE 25680
|
|
|
|
EXPOSE 25681
|
|
|
|
ENTRYPOINT ["/bin/dumb-init", "--"]
|
|
|
|
CMD ["/sshpoke"]
|