Skip to content

Commit fa2d0bc

Browse files
committed
feat: simplify Dockerfile, remove unused scripts
1 parent 248c416 commit fa2d0bc

File tree

9 files changed

+50
-104
lines changed

9 files changed

+50
-104
lines changed

14.0/Dockerfile

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

4343

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

5455
# grab dockerize to generate template and
5556
# wait on postgres
@@ -63,7 +64,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
6364
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6465

6566

66-
6767
VOLUME ["/data/odoo", "/var/log/odoo"]
6868
USER odoo
6969
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -74,8 +74,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7474
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7575
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7676
USER root
77-
RUN set -x; \
78-
sh -c /install/purge_dev_package_and_cache.sh
77+
RUN /install/purge_dev_package_and_cache.sh
7978

8079
USER odoo
8180
EXPOSE 8069 8072

15.0/Dockerfile

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

4343

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

5455
# grab dockerize to generate template and
5556
# wait on postgres
@@ -63,7 +64,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
6364
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6465

6566

66-
6767
VOLUME ["/data/odoo", "/var/log/odoo"]
6868
USER odoo
6969
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -74,8 +74,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7474
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7575
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7676
USER root
77-
RUN set -x; \
78-
sh -c /install/purge_dev_package_and_cache.sh
77+
RUN /install/purge_dev_package_and_cache.sh
7978

8079
USER odoo
8180
EXPOSE 8069 8072

16.0/Dockerfile

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

4343

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

5455
# grab dockerize to generate template and
5556
# wait on postgres
@@ -73,8 +74,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7374
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7475
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7576
USER root
76-
RUN set -x; \
77-
sh -c /install/purge_dev_package_and_cache.sh
77+
RUN /install/purge_dev_package_and_cache.sh
7878

7979
USER odoo
8080
EXPOSE 8069 8072

17.0/Dockerfile

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

4343

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

5555
# grab dockerize to generate template and
5656
# wait on postgres
@@ -64,7 +64,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
6464
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6565

6666

67-
6867
VOLUME ["/data/odoo", "/var/log/odoo"]
6968
USER odoo
7069
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -75,8 +74,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7574
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7675
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7776
USER root
78-
RUN set -x; \
79-
sh -c /install/purge_dev_package_and_cache.sh
77+
RUN /install/purge_dev_package_and_cache.sh
8078

8179
USER odoo
8280
EXPOSE 8069 8072

18.0/Dockerfile

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

4343

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

5455
# grab dockerize to generate template and
5556
# wait on postgres
@@ -63,7 +64,6 @@ COPY --chown=odoo:root --chmod=770 ./start-entrypoint.d /odoo/start-entrypoint.d
6364
COPY --chown=odoo:root --chmod=770 ./MANIFEST.in /odoo
6465

6566

66-
6767
VOLUME ["/data/odoo", "/var/log/odoo"]
6868
USER odoo
6969
RUN python3 -m venv /odoo/.venv --system-site-packages
@@ -74,8 +74,7 @@ RUN echo "export PATH=$PATH" >> ~/.bashrc
7474
RUN /odoo/.venv/bin/pip install -r /odoo/base_requirements.txt
7575
RUN /odoo/.venv/bin/pip install -r /odoo/extra_requirements.txt
7676
USER root
77-
RUN set -x; \
78-
sh -c /install/purge_dev_package_and_cache.sh
77+
RUN /install/purge_dev_package_and_cache.sh
7978

8079
USER odoo
8180
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: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -eo pipefail
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)