Create Dockerfile

This commit is contained in:
Kevin Li 2019-05-21 15:01:02 +08:00 committed by GitHub
parent 856157af79
commit 9ad7d64762
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

19
Dockerfile Normal file
View File

@ -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" ]