Feat: UPDATE Dockerfile
This commit is contained in:
parent
35fe3f6c41
commit
15841efc81
52
Dockerfile
52
Dockerfile
@ -1,43 +1,18 @@
|
|||||||
FROM node as builder-node
|
FROM node as builder-node
|
||||||
|
ENV SERIES 6.8
|
||||||
ARG TRYTOND_VERSION
|
|
||||||
ENV SERIES ${TRYTOND_VERSION}
|
|
||||||
|
|
||||||
RUN npm install -g bower
|
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
|
RUN cd /package && bower install --allow-root
|
||||||
|
|
||||||
FROM debian:11-slim
|
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 <foundation@tryton.org>" \
|
LABEL maintainer="Tryton <foundation@tryton.org>" \
|
||||||
org.label-schema.name="Tryton" \
|
org.label-schema.name="Tryton" \
|
||||||
org.label-schema.url="http://www.tryton.org/" \
|
org.label-schema.url="http://www.tryton.org/" \
|
||||||
org.label-schema.vendor="Tryton" \
|
org.label-schema.vendor="Tryton" \
|
||||||
org.label-schema.version="$SERIES" \
|
org.label-schema.version="6.8" \
|
||||||
org.label-schema.schema-version="1.0"
|
org.label-schema.schema-version="1.0"
|
||||||
|
|
||||||
|
ENV SERIES 6.8
|
||||||
ENV LANG C.UTF-8
|
ENV LANG C.UTF-8
|
||||||
|
|
||||||
RUN groupadd -r trytond \
|
RUN groupadd -r trytond \
|
||||||
@ -48,13 +23,8 @@ RUN groupadd -r trytond \
|
|||||||
&& echo "[DEFAULT]\nbyte-compile = standard, optimize" \
|
&& echo "[DEFAULT]\nbyte-compile = standard, optimize" \
|
||||||
> /etc/python3/debian_config
|
> /etc/python3/debian_config
|
||||||
|
|
||||||
USER root
|
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
git \
|
|
||||||
python3-click \
|
|
||||||
python3-ipython \
|
|
||||||
curl \
|
curl \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
@ -64,6 +34,7 @@ RUN apt-get update \
|
|||||||
uwsgi-plugin-python3 \
|
uwsgi-plugin-python3 \
|
||||||
python3-argcomplete \
|
python3-argcomplete \
|
||||||
# trytond
|
# trytond
|
||||||
|
python3-argon2 \
|
||||||
python3-bcrypt \
|
python3-bcrypt \
|
||||||
python3-cffi \
|
python3-cffi \
|
||||||
python3-genshi \
|
python3-genshi \
|
||||||
@ -98,10 +69,13 @@ RUN apt-get update \
|
|||||||
RUN pip3 install --no-cache-dir \
|
RUN pip3 install --no-cache-dir \
|
||||||
"trytond == ${SERIES}.*" \
|
"trytond == ${SERIES}.*" \
|
||||||
"proteus == ${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; \
|
pip3 install --no-cache-dir "trytond_${module} == ${SERIES}.*" || exit 1; \
|
||||||
done \
|
done \
|
||||||
&& pip3 install --no-cache-dir \
|
&& pip3 install --no-cache-dir \
|
||||||
|
python-barcode[images] \
|
||||||
|
qrcode[pil] \
|
||||||
|
webcolors \
|
||||||
phonenumbers \
|
phonenumbers \
|
||||||
pycountry \
|
pycountry \
|
||||||
pygal \
|
pygal \
|
||||||
@ -114,16 +88,10 @@ COPY entrypoint.sh /
|
|||||||
COPY trytond.conf /etc/trytond.conf
|
COPY trytond.conf /etc/trytond.conf
|
||||||
COPY uwsgi.conf /etc/uwsgi.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
|
EXPOSE 8000
|
||||||
|
|
||||||
VOLUME ["/var/lib/trytond/db"]
|
VOLUME ["/var/lib/trytond/db"]
|
||||||
ENV TRYTOND_CONFIG=/etc/trytond.conf
|
ENV TRYTOND_CONFIG=/etc/trytond.conf
|
||||||
|
|
||||||
USER trytond
|
USER trytond
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["uwsgi", "--ini", "/etc/uwsgi.conf"]
|
CMD ["uwsgi", "--ini", "/etc/uwsgi.conf"]
|
Loading…
Reference in New Issue
Block a user