Minimal frontend for administering our LDAP server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ldapmin/Dockerfile

32 lines
690 B

4 years ago
FROM golang:1 AS builder
RUN apt-get update && apt-get install -y upx
RUN go get -u github.com/gobuffalo/packr/packr
WORKDIR /build
ENV LD_FLAGS="-w"
ENV CGO_ENABLED=0
COPY go.mod go.sum /build/
RUN go mod download
RUN go mod verify
COPY . /build/
RUN echo "-- TEST" \
&& go test ./... \
&& echo "-- BUILD" \
&& packr install -tags netgo -ldflags "${LD_FLAGS}" . \
&& echo "-- PACK" \
&& upx -9 /go/bin/ldapmin
FROM busybox
LABEL maintainer="Robert Jacob <xperimental@solidproject.de>"
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /go/bin/ldapmin /bin/ldapmin
USER nobody
EXPOSE 8080
ENTRYPOINT ["/bin/ldapmin"]