diff --git a/Dockerfile b/Dockerfile index 7a7fc87d..5178b2e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ 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 if [ "$EXTERNAL" = "1" ]; then cp sshpiperd /sshpiperd; else go build -o /sshpiperd -ldflags "-X main.mainver=$VER" ./cmd/... ; fi -RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cache/go-build if [ "$EXTERNAL" = "1" ]; then cp * /sshpiperd/plugins; rm /sshpiperd/plugins/Dockerfile; rm /sshpiperd/plugins/entrypoint.sh; rm /sshpiperd/plugins/sshpiperd ; else go build -o /sshpiperd/plugins -tags "$BUILDTAGS" ./plugin/...; fi +RUN --mount=target=/src,type=bind,source=. --mount=type=cache,target=/root/.cache/go-build if [ "$EXTERNAL" = "1" ]; then cp -r plugins /sshpiperd ; else go build -o /sshpiperd/plugins -tags "$BUILDTAGS" ./plugin/...; fi ADD entrypoint.sh /sshpiperd FROM busybox