Dockerfile and requirements.txt update

- Fix bug in python requests module missing after delete py3-pip from build stage
- Downgrade the requirement of bcrypt to >=3.1.7 for older python3 version compatibility
This commit is contained in:
Khanh Ngo 2020-10-10 21:47:58 +02:00
parent 76562f8a46
commit 75a30f14fb
No known key found for this signature in database
GPG Key ID: 29077342AA5648F6
2 changed files with 6 additions and 4 deletions

View File

@ -6,7 +6,6 @@ ARG BUILD_DEPENDENCIES="build-base \
libxml2-dev \
mariadb-connector-c-dev \
openldap-dev \
py3-pip \
python3-dev \
xmlsec-dev \
yarn"
@ -17,7 +16,11 @@ ENV LC_ALL=en_US.UTF-8 \
FLASK_APP=/build/powerdnsadmin/__init__.py
# Get dependencies
RUN apk add --no-cache ${BUILD_DEPENDENCIES}
# py3-pip should not belong to BUILD_DEPENDENCIES. Otherwise, when we remove
# them with "apk del" at the end of build stage, the python requests module
# will be removed as well - (Tested with alpine:3.12 and python 3.8.5).
RUN apk add --no-cache ${BUILD_DEPENDENCIES} && \
apk add --no-cache py3-pip
WORKDIR /build
@ -69,7 +72,6 @@ RUN pip install pip-autoremove && \
pip uninstall -y pip-autoremove && \
apk del ${BUILD_DEPENDENCIES}
# Build image
FROM alpine:3.12

View File

@ -6,7 +6,7 @@ Flask-Migrate==2.5.3
SQLAlchemy==1.3.19
mysqlclient==2.0.1
configobj==5.0.6
bcrypt==3.2.0
bcrypt>=3.1.7
requests==2.24.0
python-ldap==3.3.1
pyotp==2.4.0