This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
nginx-ldap-auth/Dockerfile

28 lines
645 B
Docker
Raw Normal View History

2018-09-15 08:43:38 -04:00
FROM golang:alpine
2018-10-09 19:59:52 -04:00
COPY . /go/src/github.com/tiagoapimenta/nginx-ldap-auth
2018-09-15 08:43:38 -04:00
2018-12-17 15:27:38 -05:00
ENV CGO_ENABLED=0
2018-10-02 20:57:29 -04:00
RUN cd /go/src/github.com/tiagoapimenta/nginx-ldap-auth && \
apk add --no-cache git && \
go get -u gopkg.in/yaml.v2 && \
go get -u gopkg.in/ldap.v2 && \
2018-12-17 15:27:38 -05:00
go build -a -x -ldflags='-s -w -extldflags -static' -v -o /go/bin/nginx-ldap-auth ./main
2018-09-15 08:43:38 -04:00
2018-12-17 15:27:38 -05:00
FROM scratch
2018-09-15 08:43:38 -04:00
MAINTAINER Tiago A. Pimenta <tiagoapimenta@gmail.com>
2018-10-02 20:57:29 -04:00
COPY --from=0 /go/bin/nginx-ldap-auth /usr/local/bin/nginx-ldap-auth
2018-09-15 08:43:38 -04:00
WORKDIR /tmp
VOLUME /etc/nginx-ldap-auth
EXPOSE 5555
2018-12-17 15:27:38 -05:00
USER 65534:65534
2018-09-15 08:43:38 -04:00
2018-12-17 15:27:38 -05:00
CMD [ "/usr/local/bin/nginx-ldap-auth", "--config", "/etc/nginx-ldap-auth/config.yaml" ]