20 lines
645 B
Docker
20 lines
645 B
Docker
|
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; \
|
||
|
make install_protobuf build
|
||
|
|
||
|
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"]
|