Skip to content
Extraits de code Groupes Projets
Sélectionner une révision Git
  • a01a9668abafd2750ee1aca6c90dccadfb102291
  • 16.0 par défaut protégée
  • 18.0
  • 17.0
  • 14.0 protégée
  • 15.0 protégée
  • 12.0 protégée
  • 10.0 protégée
8 résultats

17.0.Dockerfile

Blame
  • 17.0.Dockerfile 6,82 Kio
    FROM python:3.12-slim-bookworm AS builder
    RUN set -x; \
      apt-get update \
      && apt-get install --yes --no-install-recommends \
        build-essential \
        curl \
        git \
        libldap2-dev \
        libpq-dev \
        libsasl2-dev \
      && pip install wheel \
      && pip wheel --wheel-dir=/svc/wheels --requirement https://raw.githubusercontent.com/oca/OCB/17.0/requirements.txt \
      # astor required by base_view_inheritance_extension
      # openupgradelib required for OCA module migration from one version to another
      # phonenumbers required by phone_validation
      # python-stdnum>=1.18 required by l10n_fr_siret and l10n_fr_siret_lookup
      # zxcvbn required by password_security
      pip wheel --wheel-dir=/svc/wheels \
        'astor' \
        'git+https://github.com/OCA/openupgradelib.git@master' \
        'git+https://github.com/odoo/upgrade-util@master' \
        'phonenumbers==8.13.40' \
        'zxcvbn==4.4.28'
    
    
    FROM python:3.12-slim-bookworm AS final
    ENV LANG=C.UTF-8 \
        LC_ALL=C.UTF-8 \
        PGDATABASE=odoo
    
    RUN set -x; \
      apt-get update \
      && apt-get install --yes --no-install-recommends \
        curl \
        git \
        gnupg \
        openssh-client \
        wkhtmltopdf \
        xmlsec1 \
      && echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' >> /etc/apt/sources.list.d/postgresql.list \
      && curl -SL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \
      && curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.bookworm_amd64.deb \
      && echo 'e9f95436298c77cc9406bd4bbd242f4771d0a4b2 wkhtmltox.deb' | sha1sum -c - \
      && apt-get update \
      && apt-get install --yes --no-install-recommends ./wkhtmltox.deb \
      && apt-get install --yes --no-install-recommends postgresql-client \
      && apt-get -y autoremove \
      && rm -rf /var/lib/apt/lists/* wkhtmltox.deb
    
    COPY --from=builder /svc /svc
    RUN pip3 install --no-index --find-links=/svc/wheels --requirement https://raw.githubusercontent.com/oca/OCB/17.0/requirements.txt \
      && pip3 install --no-index --upgrade --find-links=/svc/wheels \
        'astor' \
        'openupgradelib' \
        'odoo_upgrade' \
        'phonenumbers' \
        'zxcvbn'
    
    ARG SAVE_COMMITS_DIR='/opt/odoo_commits/'
    ENV SAVE_COMMITS_DIR=$SAVE_COMMITS_DIR
    
    # Add Git Known Hosts
    COPY ./ssh_known_git_hosts /root/.ssh/known_hosts
    
    # Install Odoo and remove not French translations and .git directory to limit amount of data used by container
    ARG SAVE_COMMITS_FILENAME='ocb'
    RUN set -x; \
      repo='https://github.com/OCA/OCB' \
      branch='17.0' \
      && useradd --create-home --home-dir /opt/odoo --no-log-init odoo \