dockerizazioa
This commit is contained in:
parent
645edec125
commit
4f0097ac1b
14
Dockerfile
14
Dockerfile
@ -1,9 +1,8 @@
|
||||
FROM python:3-alpine
|
||||
|
||||
ARG USER_
|
||||
ARG UID_
|
||||
ENV USER_=admin
|
||||
ENV UID_=1000
|
||||
ARG USER_=admin
|
||||
ARG UID_=1000
|
||||
|
||||
RUN apk add --no-cache --upgrade bash
|
||||
|
||||
ADD --chown=$UID_:$UID_ . /www
|
||||
@ -19,8 +18,7 @@ RUN set -e; \
|
||||
pip install -r requirements.txt; \
|
||||
apk del .build-deps;
|
||||
|
||||
#RUN adduser -S -D $USER -u $UID_
|
||||
#USER $USER
|
||||
RUN adduser -S -D $USER_ -u $UID_
|
||||
USER $USER_
|
||||
|
||||
ENTRYPOINT ["./start.sh", "$UID_"]
|
||||
#CMD ["$UID_"]
|
||||
ENTRYPOINT ["./start.sh"]
|
||||
|
@ -52,7 +52,7 @@ Konfiguraketa fitxategia sortu:
|
||||
|
||||
edo
|
||||
|
||||
docker build -t aitzol/ldap-webui:latest . --build-arg UID_=$UID
|
||||
docker build -t aitzol/ldap-webui:latest . --build-arg UID_=$UID --build-arg USER_=$USER
|
||||
|
||||
#### Edukiontzia sortu
|
||||
|
||||
|
7
start.sh
7
start.sh
@ -11,8 +11,11 @@ fi
|
||||
if [[ $# -gt 0 ]]; then
|
||||
UID_=$1
|
||||
echo $UID_
|
||||
export LDAP_ADMIN_PASSWORD=admin
|
||||
export LDAP_READONLY_PASSWORD=readonly
|
||||
else
|
||||
UID_=$UID
|
||||
fi
|
||||
|
||||
export LDAP_ADMIN_PASSWORD=admin
|
||||
export LDAP_READONLY_PASSWORD=readonly
|
||||
|
||||
uwsgi --http :9090 --enable-threads --uid $UID_ --wsgi-file app.py
|
||||
|
Loading…
Reference in New Issue
Block a user