From 9ad7d647628a3b4071a461a4e0a71c9b67fddbe9 Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Tue, 21 May 2019 15:01:02 +0800 Subject: [PATCH] Create Dockerfile --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0d7effe --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM python:2-alpine + +WORKDIR /usr/src/app +ADD . /usr/src/app + +ENV DATAROOTDIR /usr/share +ENV SYSCONFDIR /etc + +RUN apk add --no-cache libldap && \ + apk add --no-cache --virtual build-dependencies build-base yaml-dev openldap-dev && \ + python setup.py install && \ + apk del build-dependencies && \ + cp -v conf/* /etc/ldapcherry && \ + adduser -S ldapcherry && \ + rm -rf /usr/src/app + +USER ldapcherry + +CMD [ "ldapcherryd", "-c", "/etc/ldapcherry/ldapcherry.ini", "-D" ]