From 15841efc818ec8a87426c1273cfe6f40d6c5687e Mon Sep 17 00:00:00 2001 From: sinergia Date: Sun, 10 Mar 2024 16:15:59 -0500 Subject: [PATCH] Feat: UPDATE Dockerfile --- Dockerfile | 52 ++++++++++------------------------------------------ 1 file changed, 10 insertions(+), 42 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3e32648..4715d0f 100755 --- a/Dockerfile +++ b/Dockerfile @@ -1,43 +1,18 @@ FROM node as builder-node - -ARG TRYTOND_VERSION -ENV SERIES ${TRYTOND_VERSION} - +ENV SERIES 6.8 RUN npm install -g bower -RUN curl https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf - -C / +RUN curl -L https://downloads.tryton.org/${SERIES}/tryton-sao-last.tgz | tar zxf - -C / RUN cd /package && bower install --allow-root FROM debian:11-slim - -ARG SERIES -ARG PYTHON_VERSION -ARG TRYTOND_VERSION -ARG Provider -ARG DIR_MODULES -ARG TRYTOND_LOGGING_CONFIG -ARG TRYTOND_LOGGING_LEVEL -ARG DEVELOP -ARG WORKER -ARG EMAIL -ARG TRYTONPASSFILE -ARG SMTP -ARG SMTP_TYPE -ARG SMTP_USER -ARG SMTP_PASSWORD -ARG SMTP_DOMAIN -ARG SMTP_PORT -ARG SMTP_FROM -ARG SMTP_EMAIL - -ENV SERIES ${TRYTOND_VERSION} - LABEL maintainer="Tryton " \ org.label-schema.name="Tryton" \ org.label-schema.url="http://www.tryton.org/" \ org.label-schema.vendor="Tryton" \ - org.label-schema.version="$SERIES" \ + org.label-schema.version="6.8" \ org.label-schema.schema-version="1.0" - + +ENV SERIES 6.8 ENV LANG C.UTF-8 RUN groupadd -r trytond \ @@ -48,13 +23,8 @@ RUN groupadd -r trytond \ && echo "[DEFAULT]\nbyte-compile = standard, optimize" \ > /etc/python3/debian_config -USER root - RUN apt-get update \ && apt-get install -y --no-install-recommends \ - git \ - python3-click \ - python3-ipython \ curl \ python3 \ python3-pip \ @@ -64,6 +34,7 @@ RUN apt-get update \ uwsgi-plugin-python3 \ python3-argcomplete \ # trytond + python3-argon2 \ python3-bcrypt \ python3-cffi \ python3-genshi \ @@ -98,10 +69,13 @@ RUN apt-get update \ RUN pip3 install --no-cache-dir \ "trytond == ${SERIES}.*" \ "proteus == ${SERIES}.*" \ - && for module in `curl https://downloads-cdn.tryton.org/${SERIES}/modules.txt`; do \ + && for module in `curl -L https://downloads.tryton.org/${SERIES}/modules.txt`; do \ pip3 install --no-cache-dir "trytond_${module} == ${SERIES}.*" || exit 1; \ done \ && pip3 install --no-cache-dir \ + python-barcode[images] \ + qrcode[pil] \ + webcolors \ phonenumbers \ pycountry \ pygal \ @@ -114,16 +88,10 @@ COPY entrypoint.sh / COPY trytond.conf /etc/trytond.conf COPY uwsgi.conf /etc/uwsgi.conf -COPY trytond_logging.conf /etc/trytond_logging.conf -COPY trytond_cron_logging.conf /etc/trytond_cron_logging.conf -COPY trytond_worker_logging.conf /etc/trytond_worker_logging.conf - EXPOSE 8000 VOLUME ["/var/lib/trytond/db"] ENV TRYTOND_CONFIG=/etc/trytond.conf - USER trytond ENTRYPOINT ["/entrypoint.sh"] - CMD ["uwsgi", "--ini", "/etc/uwsgi.conf"] \ No newline at end of file