mirror of
https://github.com/nginxinc/nginx-ldap-auth.git
synced 2026-09-30 11:36:49 +02:00
With this anyone can effectively use Python 2 or 3 using --build-arg The default version is 2.
18 lines
445 B
Docker
18 lines
445 B
Docker
ARG PYTHON_VERSION=2
|
|
FROM python:${PYTHON_VERSION}-alpine
|
|
|
|
COPY nginx-ldap-auth-daemon.py /usr/src/app/
|
|
|
|
WORKDIR /usr/src/app/
|
|
|
|
# Install required software
|
|
RUN \
|
|
apk --no-cache add openldap-dev && \
|
|
apk --no-cache add --virtual build-dependencies build-base && \
|
|
pip install python-ldap && \
|
|
apk del build-dependencies
|
|
|
|
EXPOSE 8888
|
|
|
|
CMD ["python", "/usr/src/app/nginx-ldap-auth-daemon.py", "--host", "0.0.0.0", "--port", "8888"]
|