Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions 14.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM python:3.9-slim-trixie
ARG UID=999
ARG GID=0
# create the working directory and a place to set the logs (if wanted)
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv


# create the working directory and a place to set the logs (if wanted)
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
&& touch /odoo/odoo.cfg \
&& touch /odoo/.bashrc \
&& chmod 660 /odoo/odoo.cfg \
&& chmod 660 /odoo/.bashrc \
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
&& chown -R odoo:root /var/log/odoo
&& install -m 770 -o odoo -d /odoo /odoo/data /var/log/odoo /odoo/.venv \
/odoo/data/odoo /odoo/data/odoo/{addons,filestore,sessions} \
&& install -m 660 -o odoo /dev/null /odoo/odoo.cfg \
&& install -m 660 -o odoo /dev/null /odoo/.bashrc \
&& usermod odoo --home /odoo

COPY --chown=odoo:root --chmod=770 ./install /install
COPY --chown=odoo:root --chmod=660 ./base_requirements.txt /odoo
Expand Down Expand Up @@ -56,7 +53,7 @@ RUN /install/dockerize.sh

COPY --chown=odoo:root --chmod=660 ./src_requirements.txt /odoo
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
Expand All @@ -65,8 +62,7 @@ COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo

VOLUME ["/data/odoo", "/var/log/odoo"]
USER odoo
RUN chmod -R 770 /odoo/.venv
RUN python3 -m venv /odoo/.venv --system-site-packages
RUN python3 -m venv /odoo/.venv --system-site-packages
ENV PATH=/odoo/.venv/bin:$PATH
ENV PYTHONPATH=/odoo/
RUN echo "export PATH=$PATH" >> ~/.bashrc
Expand Down
18 changes: 7 additions & 11 deletions 15.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM python:3.12-slim-trixie
ARG UID=999
ARG GID=0
# create the working directory and a place to set the logs (if wanted)
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv


# create the working directory and a place to set the logs (if wanted)
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
&& touch /odoo/odoo.cfg \
&& touch /odoo/.bashrc \
&& chmod 660 /odoo/odoo.cfg \
&& chmod 660 /odoo/.bashrc \
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
&& chown -R odoo:root /var/log/odoo
&& install -m 770 -o odoo -d /odoo /odoo/data /var/log/odoo /odoo/.venv \
/odoo/data/odoo /odoo/data/odoo/{addons,filestore,sessions} \
&& install -m 660 -o odoo /dev/null /odoo/odoo.cfg \
&& install -m 660 -o odoo /dev/null /odoo/.bashrc \
&& usermod odoo --home /odoo

COPY --chown=odoo:root --chmod=770 ./install /install
COPY --chown=odoo:root --chmod=660 ./base_requirements.txt /odoo
Expand Down Expand Up @@ -56,7 +53,7 @@ RUN /install/dockerize.sh

COPY --chown=odoo:root --chmod=660 ./src_requirements.txt /odoo
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
Expand All @@ -65,7 +62,6 @@ COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo

VOLUME ["/data/odoo", "/var/log/odoo"]
USER odoo
RUN chmod -R 770 /odoo/.venv
RUN python3 -m venv /odoo/.venv --system-site-packages
ENV PATH=/odoo/.venv/bin:$PATH
ENV PYTHONPATH=/odoo/
Expand Down
20 changes: 8 additions & 12 deletions 16.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM python:3.12-slim-trixie
ARG UID=999
ARG GID=0
# create the working directory and a place to set the logs (if wanted)
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv


# create the working directory and a place to set the logs (if wanted)
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
&& touch /odoo/odoo.cfg \
&& touch /odoo/.bashrc \
&& chmod 660 /odoo/odoo.cfg \
&& chmod 660 /odoo/.bashrc \
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
&& chown -R odoo:root /var/log/odoo
&& install -m 770 -o odoo -d /odoo /odoo/data /var/log/odoo /odoo/.venv \
/odoo/data/odoo /odoo/data/odoo/{addons,filestore,sessions} \
&& install -m 660 -o odoo /dev/null /odoo/odoo.cfg \
&& install -m 660 -o odoo /dev/null /odoo/.bashrc \
&& usermod odoo --home /odoo

COPY --chown=odoo:root --chmod=770 ./install /install
COPY --chown=odoo:root --chmod=660 ./base_requirements.txt /odoo
Expand Down Expand Up @@ -56,16 +53,15 @@ RUN /install/dockerize.sh

COPY --chown=odoo:root --chmod=660 ./src_requirements.txt /odoo
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo


VOLUME ["/data/odoo", "/var/log/odoo"]
USER odoo
RUN chmod -R 770 /odoo/.venv
RUN python3 -m venv /odoo/.venv --system-site-packages
RUN python3 -m venv /odoo/.venv --system-site-packages
ENV PATH=/odoo/.venv/bin:$PATH
ENV PYTHONPATH=/odoo/
RUN echo "export PATH=$PATH" >> ~/.bashrc
Expand Down
20 changes: 8 additions & 12 deletions 17.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM python:3.12-slim-trixie
ARG UID=999
ARG GID=0
# create the working directory and a place to set the logs (if wanted)
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv


# create the working directory and a place to set the logs (if wanted)
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
&& touch /odoo/odoo.cfg \
&& touch /odoo/.bashrc \
&& chmod 660 /odoo/odoo.cfg \
&& chmod 660 /odoo/.bashrc \
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
&& chown -R odoo:root /var/log/odoo
&& install -m 770 -o odoo -d /odoo /odoo/data /var/log/odoo /odoo/.venv \
/odoo/data/odoo /odoo/data/odoo/{addons,filestore,sessions} \
&& install -m 660 -o odoo /dev/null /odoo/odoo.cfg \
&& install -m 660 -o odoo /dev/null /odoo/.bashrc \
&& usermod odoo --home /odoo

COPY --chown=odoo:root --chmod=770 ./install /install
COPY --chown=odoo:root --chmod=660 ./base_requirements.txt /odoo
Expand Down Expand Up @@ -57,7 +54,7 @@ RUN /install/dockerize.sh

COPY --chown=odoo:root --chmod=660 ./src_requirements.txt /odoo
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
Expand All @@ -66,8 +63,7 @@ COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo

VOLUME ["/data/odoo", "/var/log/odoo"]
USER odoo
RUN chmod -R 770 /odoo/.venv
RUN python3 -m venv /odoo/.venv --system-site-packages
RUN python3 -m venv /odoo/.venv --system-site-packages
ENV PATH=/odoo/.venv/bin:$PATH
ENV PYTHONPATH=/odoo/
RUN echo "export PATH=$PATH" >> ~/.bashrc
Expand Down
18 changes: 7 additions & 11 deletions 18.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
FROM python:3.12-slim-trixie
ARG UID=999
ARG GID=0
# create the working directory and a place to set the logs (if wanted)
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv


# create the working directory and a place to set the logs (if wanted)
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
&& touch /odoo/odoo.cfg \
&& touch /odoo/.bashrc \
&& chmod 660 /odoo/odoo.cfg \
&& chmod 660 /odoo/.bashrc \
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
&& chown -R odoo:root /var/log/odoo
&& install -m 770 -o odoo -d /odoo /odoo/data /var/log/odoo /odoo/.venv \
/odoo/data/odoo /odoo/data/odoo/{addons,filestore,sessions} \
&& install -m 660 -o odoo /dev/null /odoo/odoo.cfg \
&& install -m 660 -o odoo /dev/null /odoo/.bashrc \
&& usermod odoo --home /odoo

COPY --chown=odoo:root --chmod=770 ./install /install
COPY --chown=odoo:root --chmod=660 ./base_requirements.txt /odoo
Expand Down Expand Up @@ -56,7 +53,7 @@ RUN /install/dockerize.sh

COPY --chown=odoo:root --chmod=660 ./src_requirements.txt /odoo
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=660 ./templates /templates
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
Expand All @@ -65,7 +62,6 @@ COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo

VOLUME ["/data/odoo", "/var/log/odoo"]
USER odoo
RUN chmod -R 770 /odoo/.venv
RUN python3 -m venv /odoo/.venv --system-site-packages
ENV PATH=/odoo/.venv/bin:$PATH
ENV PYTHONPATH=/odoo/
Expand Down
6 changes: 3 additions & 3 deletions install/setup-pip.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/bin/bash
set -eo pipefail
# Install pip with ensuire pip
# Install pip -- https://docs.python.org/library/ensurepip
python -m ensurepip
cat << EOF > /etc/pip.conf
[global]
# counter-intuitively, false means that we enable 'no-cache-dir'
# "To enable the boolean options --no-compile and --no-cache-dir, falsy values have to be used"
# https://pip.pypa.io/en/stable/user_guide/#configuration
# https://pip.pypa.io/en/stable/topics/configuration/#boolean-options
no-cache-dir = false
disable-pip-version-check = True
disable-pip-version-check = true
EOF