Odoo18-Base/Dockerfile
KaySar12 453e72d987
Some checks are pending
Setup Native Action / native (3.12.7) (push) Waiting to run
Setup Native Action / docker (3.12.7) (push) Waiting to run
update
2025-03-20 15:18:56 +07:00

37 lines
1.3 KiB
Docker

FROM odoo:18.0
# Overwrite odoo with addons
COPY ./odoo /usr/lib/python3/dist-packages/
COPY ./addons /usr/lib/python3/dist-packages/odoo
COPY ./deployment/entrypoint.sh /
# Copy entrypoint script and Odoo configuration file
# COPY deployment/entrypoint.sh /
# COPY deployment/odoo.conf /etc/odoo/
USER root
RUN apt update -y && \
apt install -y python3-pip libldap2-dev libpq-dev libsasl2-dev postgresql-client libreoffice wkhtmltopdf ansible terraform && \
apt clean && rm -rf /var/lib/apt/lists/*
COPY ./requirements.txt /usr/lib/python3/dist-packages/
RUN pip install -r /usr/lib/python3/dist-packages/requirements.txt
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons and /mnt/backup for backup
RUN chown odoo /etc/odoo/odoo.conf \
&& mkdir -p /mnt/extra-addons \
&& chown -R odoo /mnt/extra-addons \
&& mkdir -p /var/lib/odoo/backup \
&& chown -R odoo /var/lib/odoo/backup
VOLUME ["/var/lib/odoo", "/mnt/extra-addons","/var/lib/odoo/backup"]
# Expose Odoo services
EXPOSE 8069 8071 8072
# Set the default config file
ENV ODOO_RC /etc/odoo/odoo.conf
# COPY deployment/wait-for-psql.py /usr/local/bin/wait-for-psql.py
# Set default user when running the container
USER odoo
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]