move e2e piper process manager to go code
This commit is contained in:
parent
57a57e89ef
commit
5e9f689999
8 changed files with 88 additions and 65 deletions
14
Dockerfile
14
Dockerfile
|
|
@ -10,22 +10,20 @@ COPY go.mod go.sum /cache/
|
|||
WORKDIR /cache
|
||||
RUN go mod download
|
||||
|
||||
RUN mkdir -p /out/plugins
|
||||
RUN mkdir -p /sshpiperd/plugins
|
||||
ADD . /src/
|
||||
WORKDIR /src
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build go build -o /out -ldflags "-X main.mainver=$VER" ./cmd/...
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build go build -o /out/plugins -ldflags "-X main.mainver=$VER" ./plugin/...
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build go build -o /sshpiperd -ldflags "-X main.mainver=$VER" ./cmd/...
|
||||
RUN --mount=type=cache,target=/root/.cache/go-build go build -o /sshpiperd/plugins -ldflags "-X main.mainver=$VER" ./plugin/...
|
||||
ADD entrypoint.sh /sshpiperd
|
||||
|
||||
FROM busybox
|
||||
LABEL maintainer="Boshi Lian<farmer1992@gmail.com>"
|
||||
|
||||
COPY --from=ep76/openssh-static:latest /usr/bin/ssh-keygen /bin/ssh-keygen
|
||||
RUN mkdir /etc/ssh/
|
||||
RUN mkdir /sshpiperd
|
||||
|
||||
ADD entrypoint.sh /sshpiperd
|
||||
COPY --from=builder /out/ /sshpiperd
|
||||
COPY --from=builder /sshpiperd/ /sshpiperd
|
||||
EXPOSE 2222
|
||||
|
||||
ENTRYPOINT ["/sshpiperd/entrypoint.sh"]
|
||||
CMD ["/sshpiperd/sshpiperd", "/sshpiperd/plugins/workingdir"]
|
||||
CMD ["/sshpiperd/entrypoint.sh"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue