changeset fd3f36a42d1b in tryton-docker:default
details: https://hg.tryton.org/tryton-docker?cmd=changeset;node=fd3f36a42d1b
description:
Install optimized python code
issue8285
review257361002
diffstat:
4.4/Dockerfile | 11 +++++++----
4.6/Dockerfile | 11 +++++++----
4.8/Dockerfile | 11 +++++++----
5.0/Dockerfile | 11 +++++++----
4 files changed, 28 insertions(+), 16 deletions(-)
diffs (124 lines):
diff -r a592e95cd549 -r fd3f36a42d1b 4.4/Dockerfile
--- a/4.4/Dockerfile Fri Mar 15 17:56:05 2019 +0100
+++ b/4.4/Dockerfile Sat Apr 27 10:28:38 2019 +0200
@@ -18,7 +18,10 @@
RUN groupadd -r trytond \
&& useradd --no-log-init -r -d /var/lib/trytond -m -g trytond trytond \
&& mkdir /var/lib/trytond/db && chown trytond:trytond /var/lib/trytond/db \
- && mkdir /var/lib/trytond/www
+ && mkdir /var/lib/trytond/www \
+ && mkdir -p /etc/python3 \
+ && echo "[DEFAULT]\nbyte-compile = standard, optimize" \
+ > /etc/python3/debian_config
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -45,12 +48,12 @@
python3-zeep \
&& rm -rf /var/lib/apt/lists/*
-RUN pip3 install --no-cache-dir \
+RUN pip3 install --no-cache-dir --install-option="-O1" \
"trytond == ${SERIES}.*" \
&& for module in `curl
https://downloads.tryton.org/${SERIES}/modules.txt`; do \
- pip3 install --no-cache-dir "trytond_${module} == ${SERIES}.*"; \
+ pip3 install --no-cache-dir --install-option="-O1" "trytond_${module}
== ${SERIES}.*"; \
done \
- && pip3 install --no-cache-dir phonenumbers python-stdnum[SOAP]
+ && pip3 install --no-cache-dir --install-option="-O1" phonenumbers
python-stdnum[SOAP]
COPY --from=builder-node /package /var/lib/trytond/www
COPY entrypoint.sh /
diff -r a592e95cd549 -r fd3f36a42d1b 4.6/Dockerfile
--- a/4.6/Dockerfile Fri Mar 15 17:56:05 2019 +0100
+++ b/4.6/Dockerfile Sat Apr 27 10:28:38 2019 +0200
@@ -18,7 +18,10 @@
RUN groupadd -r trytond \
&& useradd --no-log-init -r -d /var/lib/trytond -m -g trytond trytond \
&& mkdir /var/lib/trytond/db && chown trytond:trytond /var/lib/trytond/db \
- && mkdir /var/lib/trytond/www
+ && mkdir /var/lib/trytond/www \
+ && mkdir -p /etc/python3 \
+ && echo "[DEFAULT]\nbyte-compile = standard, optimize" \
+ > /etc/python3/debian_config
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -48,12 +51,12 @@
python3-zeep \
&& rm -rf /var/lib/apt/lists/*
-RUN pip3 install --no-cache-dir \
+RUN pip3 install --no-cache-dir --install-option="-O1" \
"trytond == ${SERIES}.*" \
&& for module in `curl
https://downloads.tryton.org/${SERIES}/modules.txt`; do \
- pip3 install --no-cache-dir "trytond_${module} == ${SERIES}.*"; \
+ pip3 install --no-cache-dir --install-option="-O1" "trytond_${module}
== ${SERIES}.*"; \
done \
- && pip3 install --no-cache-dir phonenumbers python-stdnum[SOAP]
+ && pip3 install --no-cache-dir --install-option="-O1" phonenumbers
python-stdnum[SOAP]
COPY --from=builder-node /package /var/lib/trytond/www
COPY entrypoint.sh /
diff -r a592e95cd549 -r fd3f36a42d1b 4.8/Dockerfile
--- a/4.8/Dockerfile Fri Mar 15 17:56:05 2019 +0100
+++ b/4.8/Dockerfile Sat Apr 27 10:28:38 2019 +0200
@@ -18,7 +18,10 @@
RUN groupadd -r trytond \
&& useradd --no-log-init -r -d /var/lib/trytond -m -g trytond trytond \
&& mkdir /var/lib/trytond/db && chown trytond:trytond /var/lib/trytond/db \
- && mkdir /var/lib/trytond/www
+ && mkdir /var/lib/trytond/www \
+ && mkdir -p /etc/python3 \
+ && echo "[DEFAULT]\nbyte-compile = standard, optimize" \
+ > /etc/python3/debian_config
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -50,12 +53,12 @@
python3-zeep \
&& rm -rf /var/lib/apt/lists/*
-RUN pip3 install --no-cache-dir \
+RUN pip3 install --no-cache-dir --install-option="-O1" \
"trytond == ${SERIES}.*" \
&& for module in `curl
https://downloads.tryton.org/${SERIES}/modules.txt`; do \
- pip3 install --no-cache-dir "trytond_${module} == ${SERIES}.*"; \
+ pip3 install --no-cache-dir --install-option="-O1" "trytond_${module}
== ${SERIES}.*"; \
done \
- && pip3 install --no-cache-dir phonenumbers python-stdnum[SOAP] pygal
+ && pip3 install --no-cache-dir --install-option="-O1" phonenumbers
python-stdnum[SOAP] pygal
COPY --from=builder-node /package /var/lib/trytond/www
COPY entrypoint.sh /
diff -r a592e95cd549 -r fd3f36a42d1b 5.0/Dockerfile
--- a/5.0/Dockerfile Fri Mar 15 17:56:05 2019 +0100
+++ b/5.0/Dockerfile Sat Apr 27 10:28:38 2019 +0200
@@ -18,7 +18,10 @@
RUN groupadd -r trytond \
&& useradd --no-log-init -r -d /var/lib/trytond -m -g trytond trytond \
&& mkdir /var/lib/trytond/db && chown trytond:trytond /var/lib/trytond/db \
- && mkdir /var/lib/trytond/www
+ && mkdir /var/lib/trytond/www \
+ && mkdir -p /etc/python3 \
+ && echo "[DEFAULT]\nbyte-compile = standard, optimize" \
+ > /etc/python3/debian_config
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -50,12 +53,12 @@
python3-zeep \
&& rm -rf /var/lib/apt/lists/*
-RUN pip3 install --no-cache-dir \
+RUN pip3 install --no-cache-dir --install-option="-O1" \
"trytond == ${SERIES}.*" \
&& for module in `curl
https://downloads.tryton.org/${SERIES}/modules.txt`; do \
- pip3 install --no-cache-dir "trytond_${module} == ${SERIES}.*"; \
+ pip3 install --no-cache-dir --install-option="-O1" "trytond_${module}
== ${SERIES}.*"; \
done \
- && pip3 install --no-cache-dir phonenumbers python-stdnum[SOAP] pygal
+ && pip3 install --no-cache-dir --install-option="-O1" phonenumbers
python-stdnum[SOAP] pygal
COPY --from=builder-node /package /var/lib/trytond/www
COPY entrypoint.sh /