Skip to content

Commit 0a290b7

Browse files
committed
feat: simplify Dockerfile, remove unused scripts
1 parent 52f590a commit 0a290b7

File tree

9 files changed

+51
-105
lines changed

9 files changed

+51
-105
lines changed

14.0/Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ ENV BUILD_PACKAGE="\
3737
libcairo2-dev"
3838

3939

40+
# Default SHELL is ["/bin/sh", "-c"]
41+
SHELL ["/bin/sh", "-e", "-x", "-c"]
42+
4043
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
41-
# wkhtml-buster is kept as in official image, no deb available for bullseye
42-
RUN set -x; \
43-
sh -c /install/package_odoo.sh \
44-
&& /install/setup-pip.sh \
45-
&& /install/postgres.sh \
46-
&& /install/kwkhtml_client.sh \
47-
&& /install/kwkhtml_client_force_python3.sh \
48-
&& /install/dev_package.sh
44+
RUN /install/package_odoo.sh \
45+
&& /install/setup-pip.sh \
46+
&& /install/postgres.sh \
47+
&& /install/kwkhtml_client.sh \
48+
&& /install/kwkhtml_client_force_python3.sh \
49+
&& /install/dev_package.sh
4950

5051
# grab dockerize to generate template and
5152
# wait on postgres
@@ -59,7 +60,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
5960
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6061

6162

62-
6363
VOLUME ["/data/odoo", "/var/log/odoo"]
6464
USER odoo
6565
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -70,8 +70,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7070
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7171
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7272
USER root
73-
RUN set -x; \
74-
sh -c /install/purge_dev_package_and_cache.sh
73+
RUN /install/purge_dev_package_and_cache.sh
7574

7675
USER odoo
7776
EXPOSE 8069 8072

15.0/Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ ENV BUILD_PACKAGE="\
3737
libcairo2-dev"
3838

3939

40+
# Default SHELL is ["/bin/sh", "-c"]
41+
SHELL ["/bin/sh", "-e", "-x", "-c"]
42+
4043
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
41-
# wkhtml-buster is kept as in official image, no deb available for bullseye
42-
RUN set -x; \
43-
sh -c /install/package_odoo.sh \
44-
&& /install/setup-pip.sh \
45-
&& /install/postgres.sh \
46-
&& /install/kwkhtml_client.sh \
47-
&& /install/kwkhtml_client_force_python3.sh \
48-
&& /install/dev_package.sh
44+
RUN /install/package_odoo.sh \
45+
&& /install/setup-pip.sh \
46+
&& /install/postgres.sh \
47+
&& /install/kwkhtml_client.sh \
48+
&& /install/kwkhtml_client_force_python3.sh \
49+
&& /install/dev_package.sh
4950

5051
# grab dockerize to generate template and
5152
# wait on postgres
@@ -59,7 +60,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
5960
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6061

6162

62-
6363
VOLUME ["/data/odoo", "/var/log/odoo"]
6464
USER odoo
6565
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -70,8 +70,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7070
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7171
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7272
USER root
73-
RUN set -x; \
74-
sh -c /install/purge_dev_package_and_cache.sh
73+
RUN /install/purge_dev_package_and_cache.sh
7574

7675
USER odoo
7776
EXPOSE 8069 8072

16.0/Dockerfile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ ENV BUILD_PACKAGE="\
3737
libcairo2-dev"
3838

3939

40+
# Default SHELL is ["/bin/sh", "-c"]
41+
SHELL ["/bin/sh", "-e", "-x", "-c"]
42+
4043
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
41-
# wkhtml-buster is kept as in official image, no deb available for bullseye
42-
RUN set -x; \
43-
sh -c /install/package_odoo.sh \
44-
&& /install/setup-pip.sh \
45-
&& /install/postgres.sh \
46-
&& /install/kwkhtml_client.sh \
47-
&& /install/kwkhtml_client_force_python3.sh \
48-
&& /install/dev_package.sh
44+
RUN /install/package_odoo.sh \
45+
&& /install/setup-pip.sh \
46+
&& /install/postgres.sh \
47+
&& /install/kwkhtml_client.sh \
48+
&& /install/kwkhtml_client_force_python3.sh \
49+
&& /install/dev_package.sh
4950

5051
# grab dockerize to generate template and
5152
# wait on postgres
@@ -69,8 +70,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
6970
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7071
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7172
USER root
72-
RUN set -x; \
73-
sh -c /install/purge_dev_package_and_cache.sh
73+
RUN /install/purge_dev_package_and_cache.sh
7474

7575
USER odoo
7676
EXPOSE 8069 8072

17.0/Dockerfile

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ ENV BUILD_PACKAGE="\
3737
libcairo2-dev"
3838

3939

40-
# run in a virtualenv
40+
# Default SHELL is ["/bin/sh", "-c"]
41+
SHELL ["/bin/sh", "-e", "-x", "-c"]
42+
4143
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
42-
# wkhtml-buster is kept as in official image, no deb available for bullseye
43-
RUN set -x; \
44-
sh -c /install/package_odoo.sh \
45-
&& /install/setup-pip.sh \
46-
&& /install/postgres.sh \
47-
&& /install/kwkhtml_client.sh \
48-
&& /install/kwkhtml_client_force_python3.sh \
49-
&& /install/dev_package.sh
44+
RUN /install/package_odoo.sh \
45+
&& /install/setup-pip.sh \
46+
&& /install/postgres.sh \
47+
&& /install/kwkhtml_client.sh \
48+
&& /install/kwkhtml_client_force_python3.sh \
49+
&& /install/dev_package.sh
5050

5151
# grab dockerize to generate template and
5252
# wait on postgres
@@ -60,7 +60,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
6060
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6161

6262

63-
6463
VOLUME ["/data/odoo", "/var/log/odoo"]
6564
USER odoo
6665
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -71,8 +70,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7170
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7271
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7372
USER root
74-
RUN set -x; \
75-
sh -c /install/purge_dev_package_and_cache.sh
73+
RUN /install/purge_dev_package_and_cache.sh
7674

7775
USER odoo
7876
EXPOSE 8069 8072

18.0/Dockerfile

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,16 @@ ENV BUILD_PACKAGE="\
3737
libcairo2-dev"
3838

3939

40+
# Default SHELL is ["/bin/sh", "-c"]
41+
SHELL ["/bin/sh", "-e", "-x", "-c"]
42+
4043
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
41-
# wkhtml-buster is kept as in official image, no deb available for bullseye
42-
RUN set -x; \
43-
sh -c /install/package_odoo.sh \
44-
&& /install/setup-pip.sh \
45-
&& /install/postgres.sh \
46-
&& /install/kwkhtml_client.sh \
47-
&& /install/kwkhtml_client_force_python3.sh \
48-
&& /install/dev_package.sh
44+
RUN /install/package_odoo.sh \
45+
&& /install/setup-pip.sh \
46+
&& /install/postgres.sh \
47+
&& /install/kwkhtml_client.sh \
48+
&& /install/kwkhtml_client_force_python3.sh \
49+
&& /install/dev_package.sh
4950

5051
# grab dockerize to generate template and
5152
# wait on postgres
@@ -59,7 +60,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
5960
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6061

6162

62-
6363
VOLUME ["/data/odoo", "/var/log/odoo"]
6464
USER odoo
6565
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -70,8 +70,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7070
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7171
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7272
USER root
73-
RUN set -x; \
74-
sh -c /install/purge_dev_package_and_cache.sh
73+
RUN /install/purge_dev_package_and_cache.sh
7574

7675
USER odoo
7776
EXPOSE 8069 8072

install/disable_dst_root_cert-jessie.sh

Lines changed: 0 additions & 5 deletions
This file was deleted.

install/package_odoo_11.0_12.0.sh

Lines changed: 0 additions & 30 deletions
This file was deleted.

install/purge_dev_package_and_cache.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/bin/bash
2-
set -eo pipefail
1+
#!/bin/sh -eux
32

43
apt-get remove -y $BUILD_PACKAGE
54
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false $PURGE_PACKAGE

install/reportlab_init.sh

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)