diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3267a17 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM golang:1.15 as build +WORKDIR /netauth/ldap +COPY . . +RUN go mod vendor && \ + CGO_ENABLED=0 GOOS=linux go build -a -ldflags '-extldflags "-static"' -o /ldapd . + +FROM scratch +ENTRYPOINT ["/ldapd"] +COPY --from=build /ldapd /ldapd