mirror of
https://github.com/linuxserver/docker-ldap-auth.git
synced 2026-02-20 01:01:02 +08:00
44 lines
935 B
Docker
44 lines
935 B
Docker
FROM lsiobase/alpine:3.11
|
|
|
|
# set version label
|
|
ARG BUILD_DATE
|
|
ARG VERSION
|
|
ARG LDAP_VERSION
|
|
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
|
|
LABEL maintainer="aptalca"
|
|
|
|
RUN \
|
|
echo "**** install build packages ****" && \
|
|
apk add --no-cache --virtual=build-dependencies \
|
|
build-base \
|
|
libffi-dev \
|
|
openldap-dev \
|
|
python3-dev && \
|
|
echo "**** install runtime packages ****" && \
|
|
apk add --no-cache \
|
|
libffi \
|
|
libldap \
|
|
python3 && \
|
|
if [ -z ${LDAP_VERSION+x} ]; then \
|
|
LDAP_INSTALL="python-ldap"; \
|
|
else \
|
|
LDAP_INSTALL="python-ldap==${LDAP_VERSION}"; \
|
|
fi && \
|
|
pip3 install -U --no-cache-dir \
|
|
pip && \
|
|
pip install -U \
|
|
cryptography \
|
|
${LDAP_INSTALL} && \
|
|
echo "**** cleanup ****" && \
|
|
apk del --purge \
|
|
build-dependencies && \
|
|
rm -rf \
|
|
/tmp/* \
|
|
/root/.cache/pip
|
|
|
|
# copy local files
|
|
COPY root/ /
|
|
|
|
# ports and volumes
|
|
EXPOSE 8888 9000
|