45 lines
No EOL
1.2 KiB
Docker
45 lines
No EOL
1.2 KiB
Docker
ARG DEBIAN_RELEASE=buster
|
|
FROM debian:$DEBIAN_RELEASE
|
|
LABEL maintainer="Jan Dittberner <jan@dittberner.info>"
|
|
|
|
ARG GVALDAPGID=2000
|
|
ARG GVALDAPUID=2000
|
|
|
|
RUN apt-get update \
|
|
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
dumb-init \
|
|
gettext \
|
|
git \
|
|
libldap2-dev \
|
|
libsasl2-dev \
|
|
python3-dev \
|
|
python3-pip \
|
|
python3-setuptools \
|
|
python3-virtualenv \
|
|
python3-wheel \
|
|
&& apt-get clean \
|
|
&& rm -rf /var/lib/apt/lists/*.*
|
|
|
|
WORKDIR /srv/gvaldap
|
|
|
|
ENV LC_ALL=C.UTF-8
|
|
ENV LANG=C.UTF-8
|
|
|
|
RUN python3 -m pip install --prefix=/usr/local pipenv
|
|
|
|
COPY Pipfile Pipfile.lock /srv/gvaldap/
|
|
|
|
RUN addgroup --gid $GVALDAPGID gvaldap ; \
|
|
adduser --home /home/gvaldap --shell /bin/bash --uid $GVALDAPUID --gid $GVALDAPGID --disabled-password --gecos "Gnuviechadmin LDAP user" gvaldap
|
|
|
|
USER gvaldap
|
|
RUN python3 -m virtualenv --python=python3 /home/gvaldap/gvaldap-venv ; \
|
|
/home/gvaldap/gvaldap-venv/bin/python3 -m pip install -U pip ; \
|
|
VIRTUAL_ENV=/home/gvaldap/gvaldap-venv pipenv install --deploy --ignore-pipfile --dev
|
|
|
|
VOLUME /srv/gvaldap
|
|
|
|
COPY gvaldap.sh /srv/
|
|
|
|
ENTRYPOINT ["dumb-init", "/srv/gvaldap.sh"] |