smaller image by keeping k8s and dir plug only
This commit is contained in:
parent
cc962457f9
commit
27b1babbc0
11 changed files with 22 additions and 1 deletions
|
|
@ -1,13 +1,14 @@
|
|||
FROM golang:1.19-bullseye as builder
|
||||
|
||||
ARG VER=devel
|
||||
ARG BUILDTAGS=""
|
||||
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
RUN mkdir -p /sshpiperd/plugins
|
||||
WORKDIR /src
|
||||
RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cache/go-build go build -o /sshpiperd -ldflags "-X main.mainver=$VER" ./cmd/...
|
||||
RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cache/go-build go build -o /sshpiperd/plugins -ldflags "-X main.mainver=$VER" ./plugin/...
|
||||
RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cache/go-build go build -o /sshpiperd/plugins -tags "$BUILDTAGS" ./plugin/...
|
||||
ADD entrypoint.sh /sshpiperd
|
||||
|
||||
FROM busybox
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue