Skip to content

Commit c0926cf

Browse files
authored
fix: revert change for image size, we have issue with pip (#379)
1 parent b07d217 commit c0926cf

File tree

5 files changed

+108
-121
lines changed

5 files changed

+108
-121
lines changed

14.0/Dockerfile

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
FROM python:3.9-slim-trixie
22
ARG UID=999
3-
ARG GID=0
3+
ARG GID=999
44
# create the working directory and a place to set the logs (if wanted)
5-
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv
5+
RUN mkdir -p /odoo /var/log/odoo
66

7-
8-
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
9-
&& touch /odoo/odoo.cfg \
10-
&& touch /odoo/.bashrc \
11-
&& chmod 660 /odoo/odoo.cfg \
12-
&& chmod 660 /odoo/.bashrc \
13-
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
14-
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
15-
&& chown -R odoo:root /var/log/odoo
16-
17-
COPY --chown=odoo:root --chmod=770 ./install /install
18-
COPY --chown=odoo:root --chmod=770 ./base_requirements.txt /odoo
19-
COPY --chown=odoo:root --chmod=770 ./extra_requirements.txt /odoo
7+
COPY ./install /install
8+
COPY ./base_requirements.txt /odoo
9+
COPY ./extra_requirements.txt /odoo
10+
COPY ./test_requirements.txt /odoo
2011

2112
# Moved because there was a bug while installing `odoo-autodiscover`. There is
2213
# an accent in the contributor name
@@ -54,29 +45,36 @@ RUN set -x; \
5445
# wait on postgres
5546
RUN /install/dockerize.sh
5647

57-
COPY --chown=odoo:root --chmod=770 ./src_requirements.txt /odoo
58-
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
59-
COPY --chown=odoo:root --chmod=770 ./templates /templates
60-
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
61-
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
62-
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
63-
48+
COPY ./src_requirements.txt /odoo
49+
COPY ./bin /odoo/odoo-bin
50+
COPY ./templates /templates
51+
COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
52+
COPY ./start-entrypoint.d /odoo/start-entrypoint.d
53+
COPY ./MANIFEST.in /odoo
6454

55+
RUN groupadd -g $GID odoo \
56+
&& adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
57+
&& touch /odoo/odoo.cfg \
58+
&& touch /odoo/.bashrc \
59+
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
60+
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
61+
&& chown -R odoo:root /var/log/odoo
6562

6663
VOLUME ["/data/odoo", "/var/log/odoo"]
6764
USER odoo
68-
RUN chmod -R 770 /odoo/.venv
6965
RUN python3 -m venv /odoo/.venv --system-site-packages
7066
ENV PATH=/odoo/.venv/bin:$PATH
7167
ENV PYTHONPATH=/odoo/
7268
RUN echo "export PATH=$PATH" >> ~/.bashrc
7369

7470
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7571
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
72+
RUN /odoo/.venv/bin/pip install -r /odoo/test_requirements.txt
7673
USER root
7774
RUN set -x; \
7875
sh -c /install/purge_dev_package_and_cache.sh
79-
76+
RUN chgrp -R 0 /odoo && \
77+
chmod -R g=u /odoo
8078
USER odoo
8179
EXPOSE 8069 8072
8280

15.0/Dockerfile

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
FROM python:3.12-slim-trixie
22
ARG UID=999
3-
ARG GID=0
3+
ARG GID=999
44
# create the working directory and a place to set the logs (if wanted)
5-
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv
5+
RUN mkdir -p /odoo /var/log/odoo
66

7-
8-
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
9-
&& touch /odoo/odoo.cfg \
10-
&& touch /odoo/.bashrc \
11-
&& chmod 660 /odoo/odoo.cfg \
12-
&& chmod 660 /odoo/.bashrc \
13-
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
14-
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
15-
&& chown -R odoo:root /var/log/odoo
16-
17-
COPY --chown=odoo:root --chmod=770 ./install /install
18-
COPY --chown=odoo:root --chmod=770 ./base_requirements.txt /odoo
19-
COPY --chown=odoo:root --chmod=770 ./extra_requirements.txt /odoo
7+
COPY ./install /install
8+
COPY ./base_requirements.txt /odoo
9+
COPY ./extra_requirements.txt /odoo
10+
COPY ./test_requirements.txt /odoo
2011

2112
# Moved because there was a bug while installing `odoo-autodiscover`. There is
2213
# an accent in the contributor name
@@ -54,29 +45,36 @@ RUN set -x; \
5445
# wait on postgres
5546
RUN /install/dockerize.sh
5647

57-
COPY --chown=odoo:root --chmod=770 ./src_requirements.txt /odoo
58-
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
59-
COPY --chown=odoo:root --chmod=770 ./templates /templates
60-
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
61-
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
62-
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
63-
48+
COPY ./src_requirements.txt /odoo
49+
COPY ./bin /odoo/odoo-bin
50+
COPY ./templates /templates
51+
COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
52+
COPY ./start-entrypoint.d /odoo/start-entrypoint.d
53+
COPY ./MANIFEST.in /odoo
6454

55+
RUN groupadd -g $GID odoo \
56+
&& adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
57+
&& touch /odoo/odoo.cfg \
58+
&& touch /odoo/.bashrc \
59+
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
60+
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
61+
&& chown -R odoo:root /var/log/odoo
6562

6663
VOLUME ["/data/odoo", "/var/log/odoo"]
6764
USER odoo
68-
RUN chmod -R 770 /odoo/.venv
69-
RUN python3 -m venv /odoo/.venv --system-site-packages
65+
RUN python3 -m venv /odoo/.venv --system-site-packages
7066
ENV PATH=/odoo/.venv/bin:$PATH
7167
ENV PYTHONPATH=/odoo/
7268
RUN echo "export PATH=$PATH" >> ~/.bashrc
7369

7470
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7571
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
72+
RUN /odoo/.venv/bin/pip install -r /odoo/test_requirements.txt
7673
USER root
7774
RUN set -x; \
7875
sh -c /install/purge_dev_package_and_cache.sh
79-
76+
RUN chgrp -R 0 /odoo && \
77+
chmod -R g=u /odoo
8078
USER odoo
8179
EXPOSE 8069 8072
8280

16.0/Dockerfile

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
FROM python:3.12-slim-trixie
22
ARG UID=999
3-
ARG GID=0
3+
ARG GID=999
44
# create the working directory and a place to set the logs (if wanted)
5-
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv
5+
RUN mkdir -p /odoo /var/log/odoo
66

7-
8-
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
9-
&& touch /odoo/odoo.cfg \
10-
&& touch /odoo/.bashrc \
11-
&& chmod 660 /odoo/odoo.cfg \
12-
&& chmod 660 /odoo/.bashrc \
13-
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
14-
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
15-
&& chown -R odoo:root /var/log/odoo
16-
17-
COPY --chown=odoo:root --chmod=770 ./install /install
18-
COPY --chown=odoo:root --chmod=770 ./base_requirements.txt /odoo
19-
COPY --chown=odoo:root --chmod=770 ./extra_requirements.txt /odoo
7+
COPY ./install /install
8+
COPY ./base_requirements.txt /odoo
9+
COPY ./extra_requirements.txt /odoo
2010

2111
# Moved because there was a bug while installing `odoo-autodiscover`. There is
2212
# an accent in the contributor name
@@ -54,17 +44,23 @@ RUN set -x; \
5444
# wait on postgres
5545
RUN /install/dockerize.sh
5646

57-
COPY --chown=odoo:root --chmod=770 ./src_requirements.txt /odoo
58-
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
59-
COPY --chown=odoo:root --chmod=770 ./templates /templates
60-
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
61-
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
62-
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
47+
COPY ./src_requirements.txt /odoo
48+
COPY ./bin /odoo/odoo-bin
49+
COPY ./templates /templates
50+
COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
51+
COPY ./start-entrypoint.d /odoo/start-entrypoint.d
52+
COPY ./MANIFEST.in /odoo
6353

54+
RUN groupadd -g $GID odoo \
55+
&& adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
56+
&& touch /odoo/odoo.cfg \
57+
&& touch /odoo/.bashrc \
58+
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
59+
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
60+
&& chown -R odoo:root /var/log/odoo
6461

6562
VOLUME ["/data/odoo", "/var/log/odoo"]
6663
USER odoo
67-
RUN chmod -R 770 /odoo/.venv
6864
RUN python3 -m venv /odoo/.venv --system-site-packages
6965
ENV PATH=/odoo/.venv/bin:$PATH
7066
ENV PYTHONPATH=/odoo/
@@ -75,7 +71,8 @@ RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7571
USER root
7672
RUN set -x; \
7773
sh -c /install/purge_dev_package_and_cache.sh
78-
74+
RUN chgrp -R 0 /odoo && \
75+
chmod -R g=u /odoo
7976
USER odoo
8077
EXPOSE 8069 8072
8178

17.0/Dockerfile

Lines changed: 22 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
FROM python:3.12-slim-trixie
22
ARG UID=999
3-
ARG GID=0
3+
ARG GID=999
44
# create the working directory and a place to set the logs (if wanted)
5-
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv
5+
RUN mkdir -p /odoo /var/log/odoo
66

7-
8-
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
9-
&& touch /odoo/odoo.cfg \
10-
&& touch /odoo/.bashrc \
11-
&& chmod 660 /odoo/odoo.cfg \
12-
&& chmod 660 /odoo/.bashrc \
13-
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
14-
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
15-
&& chown -R odoo:root /var/log/odoo
16-
17-
COPY --chown=odoo:root --chmod=770 ./install /install
18-
COPY --chown=odoo:root --chmod=770 ./base_requirements.txt /odoo
19-
COPY --chown=odoo:root --chmod=770 ./extra_requirements.txt /odoo
7+
COPY ./install /install
8+
COPY ./base_requirements.txt /odoo
9+
COPY ./extra_requirements.txt /odoo
10+
COPY ./test_requirements.txt /odoo
2011

2112
# Moved because there was a bug while installing `odoo-autodiscover`. There is
2213
# an accent in the contributor name
@@ -55,29 +46,36 @@ RUN set -x; \
5546
# wait on postgres
5647
RUN /install/dockerize.sh
5748

58-
COPY --chown=odoo:root --chmod=770 ./src_requirements.txt /odoo
59-
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
60-
COPY --chown=odoo:root --chmod=770 ./templates /templates
61-
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
62-
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
63-
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
64-
49+
COPY ./src_requirements.txt /odoo
50+
COPY ./bin /odoo/odoo-bin
51+
COPY ./templates /templates
52+
COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
53+
COPY ./start-entrypoint.d /odoo/start-entrypoint.d
54+
COPY ./MANIFEST.in /odoo
6555

56+
RUN groupadd -g $GID odoo \
57+
&& adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
58+
&& touch /odoo/odoo.cfg \
59+
&& touch /odoo/.bashrc \
60+
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
61+
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
62+
&& chown -R odoo:root /var/log/odoo
6663

6764
VOLUME ["/data/odoo", "/var/log/odoo"]
6865
USER odoo
69-
RUN chmod -R 770 /odoo/.venv
7066
RUN python3 -m venv /odoo/.venv --system-site-packages
7167
ENV PATH=/odoo/.venv/bin:$PATH
7268
ENV PYTHONPATH=/odoo/
7369
RUN echo "export PATH=$PATH" >> ~/.bashrc
7470

7571
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7672
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
73+
RUN /odoo/.venv/bin/pip install -r /odoo/test_requirements.txt
7774
USER root
7875
RUN set -x; \
7976
sh -c /install/purge_dev_package_and_cache.sh
80-
77+
RUN chgrp -R 0 /odoo && \
78+
chmod -R g=u /odoo
8179
USER odoo
8280
EXPOSE 8069 8072
8381

18.0/Dockerfile

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
FROM python:3.12-slim-trixie
22
ARG UID=999
3-
ARG GID=0
3+
ARG GID=999
44
# create the working directory and a place to set the logs (if wanted)
5-
RUN mkdir -p /odoo /var/log/odoo /odoo/.venv
5+
RUN mkdir -p /odoo /var/log/odoo
66

7-
8-
RUN adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
9-
&& touch /odoo/odoo.cfg \
10-
&& touch /odoo/.bashrc \
11-
&& chmod 660 /odoo/odoo.cfg \
12-
&& chmod 660 /odoo/.bashrc \
13-
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
14-
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
15-
&& chown -R odoo:root /var/log/odoo
16-
17-
COPY --chown=odoo:root --chmod=770 ./install /install
18-
COPY --chown=odoo:root --chmod=770 ./base_requirements.txt /odoo
19-
COPY --chown=odoo:root --chmod=770 ./extra_requirements.txt /odoo
7+
COPY ./install /install
8+
COPY ./base_requirements.txt /odoo
9+
COPY ./extra_requirements.txt /odoo
2010

2111
# Moved because there was a bug while installing `odoo-autodiscover`. There is
2212
# an accent in the contributor name
@@ -54,19 +44,24 @@ RUN set -x; \
5444
# wait on postgres
5545
RUN /install/dockerize.sh
5646

57-
COPY --chown=odoo:root --chmod=770 ./src_requirements.txt /odoo
58-
COPY --chown=odoo:root --chmod=770 ./bin /odoo/odoo-bin
59-
COPY --chown=odoo:root --chmod=770 ./templates /templates
60-
COPY --chown=odoo:root --chmod=770 ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
61-
COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
62-
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
63-
47+
COPY ./src_requirements.txt /odoo
48+
COPY ./bin /odoo/odoo-bin
49+
COPY ./templates /templates
50+
COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d
51+
COPY ./start-entrypoint.d /odoo/start-entrypoint.d
52+
COPY ./MANIFEST.in /odoo
6453

54+
RUN groupadd -g $GID odoo \
55+
&& adduser --disabled-password -u $UID --gid $GID --gecos '' odoo \
56+
&& touch /odoo/odoo.cfg \
57+
&& touch /odoo/.bashrc \
58+
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \
59+
&& chown -R odoo:root /odoo && usermod odoo --home /odoo \
60+
&& chown -R odoo:root /var/log/odoo
6561

6662
VOLUME ["/data/odoo", "/var/log/odoo"]
6763
USER odoo
68-
RUN chmod -R 770 /odoo/.venv
69-
RUN python3 -m venv /odoo/.venv --system-site-packages
64+
RUN python3 -m venv /odoo/.venv --system-site-packages
7065
ENV PATH=/odoo/.venv/bin:$PATH
7166
ENV PYTHONPATH=/odoo/
7267
RUN echo "export PATH=$PATH" >> ~/.bashrc
@@ -76,7 +71,8 @@ RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7671
USER root
7772
RUN set -x; \
7873
sh -c /install/purge_dev_package_and_cache.sh
79-
74+
RUN chgrp -R 0 /odoo && \
75+
chmod -R g=u /odoo
8076
USER odoo
8177
EXPOSE 8069 8072
8278

0 commit comments

Comments
 (0)