Add dockerfile
This commit is contained in:
parent
44d8cee507
commit
55b4034696
9
Dockerfile
Normal file
9
Dockerfile
Normal file
|
@ -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
|
Loading…
Reference in a new issue