summaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 2261f5725a86c93a67242bbe2871875491b42fb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM golang:1.11 as build
WORKDIR /go/src/pwman
RUN go get -d -v gopkg.in/ldap.v2 github.com/gorilla/csrf github.com/namsral/flag
COPY *.go ./

RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o pwman .

FROM alpine:3.9
RUN apk --no-cache add ca-certificates heimdal
#FROM ubuntu:18.04
#RUN apt-get update && \
#    apt-get install -y libheimdal-kadm5-perl ca-certificates
WORKDIR /opt
COPY --from=build /go/src/pwman/pwman /usr/local/bin/
COPY krb5.conf /etc/krb5.conf
COPY static static
COPY templates templates
ENV KRB5_CONF=/etc/krb5.conf

CMD ["pwman"]