sshpiper/Dockerfile
Boshi Lian e6d5eb54d9 Squashed commit of the following:
commit 0af98df2e4d41989c451573a17e81c1f69998cfd
Author: Boshi Lian <farmer1992@gmail.com>
Date:   Sun Oct 3 18:55:59 2021 +0000

    add a working remote grpc server

commit a0acce4894fc9191ddb4c14f5cc669bca63bd920
Author: Boshi Lian <farmer1992@gmail.com>
Date:   Tue Sep 28 11:33:40 2021 +0000

    init grpc
2021-10-03 19:30:22 +00:00

30 lines
780 B
Docker

FROM golang:1.17-alpine as builder
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
ca-certificates git \
&& update-ca-certificates 2>/dev/null
ADD . /go/src/github.com/tg123/sshpiper/
WORKDIR /go/src/github.com/tg123/sshpiper/sshpiperd
RUN CGO_ENABLED=0 go build -ldflags "$(/go/src/github.com/tg123/sshpiper/sshpiperd/ldflags.sh)" -o /go/bin/sshpiperd
FROM alpine:latest
LABEL maintainer="Boshi Lian<farmer1992@gmail.com>"
RUN apk update \
&& apk upgrade \
&& apk add --no-cache \
ca-certificates \
&& update-ca-certificates 2>/dev/null
RUN mkdir /etc/ssh/
ADD entrypoint.sh /
COPY --from=builder /go/bin/sshpiperd /
EXPOSE 2222
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/sshpiperd", "daemon"]