Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPT-1 Use Ubuntu 22.04 LTS in Dockerfile #15

Merged
merged 12 commits into from
Jul 2, 2024
Merged

Conversation

borna-ng
Copy link

@borna-ng borna-ng commented May 16, 2024

Changes

  • ttf-dejavu package has been renamed to fonts-dejavu
  • tzdata package is not installed by default so it is installed manually
  • wkhtmltopdf
    • Currently used Debian package (0.12.5) cannot be installed because it depends on old libssl
    • We use the latest version packaged by original authors (0.12.6) which is at the same time the latest version available since the project is not maintained any more
    • We didn't install the same version packaged by Ubuntu because that one is not using patched Qt which provides CLI flags that we depend on
  • Python
    • Ubuntu 22.04 LTS comes with Python 3.10
    • Current odoo dependencies do not compile from Python 3.10 onward either because of Cython version changes or Python C API changes
    • We use pyenv to keep the current Python version which is 3.8
      • Some additional development system libraries are installed because Python is built from source
      • This also complies with new policy of Debian-based distributions to avoid installing system-wide Python dependencies in order to avoid breaking system packages (alternative is to use pip --break-system-packages)
    • APT's python3-magic was replaced with pip's python-magic
    • APT's python3-cairocffi was replaced with pip's cairocffi
  • Decreased Docker image size from 2.03 to 1.83 GB

Future notes

  • Explicitly delete ubuntu user
    • The new Ubuntu 24.04 LTS image comes with ubuntu user (uid=1000)
    • We should remove the ubuntu user since it is not needed and causes trouble with permissions when mounting sources into a dev container
    • That way odoo user gets to have uid=1000
  • wkhtmltopdf will have to be compiled from source (good luck 馃崁)

@borna-ng borna-ng self-assigned this May 16, 2024
@borna-ng borna-ng force-pushed the bump-ubuntu-version branch 3 times, most recently from 1283ba6 to 7c01caa Compare May 17, 2024 09:18
@borna-ng borna-ng changed the title Use Ubuntu 24.04 LTS in Dockerfile Use Ubuntu 22.04 LTS in Dockerfile May 21, 2024
@borna-ng borna-ng marked this pull request as ready for review May 21, 2024 11:19
@christophlsa
Copy link
Member

Looks good. The wkhtmltopdf should be tested later because in the past we had sometimes problems with wrong layouts etc. But probably not a big deal with the minor update.

@borna-ng
Copy link
Author

@christophlsa

We have some tests failing in the corresponding PR in odoo-addons-jobrad so we are currently looking into it.

@borna-ng borna-ng marked this pull request as draft May 23, 2024 09:45
@borna-ng borna-ng changed the title Use Ubuntu 22.04 LTS in Dockerfile CPT-1 Use Ubuntu 22.04 LTS in Dockerfile May 23, 2024
@borna-ng borna-ng marked this pull request as ready for review May 28, 2024 14:38
@borna-ng
Copy link
Author

All automated tests are passing: https://github.com/jobrad-gmbh/odoo-addons-jobrad/pull/3070

Manual testing in the sandbox still required: https://erp.cpt-1.dev.jobrad.org

Copy link

@jhelfferich jhelfferich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I just had a minor comment.

docker/Dockerfile Outdated Show resolved Hide resolved
@borna-ng borna-ng merged commit 131e201 into jobrad-14.0 Jul 2, 2024
3 checks passed
@borna-ng borna-ng deleted the bump-ubuntu-version branch July 2, 2024 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants