Files
computer-playbook/roles/web-app-odoo/files/Dockerfile
kevinveenbirkenbachandClaude Opus 4.8 2f5cf82533 test(lint): require apt Acquire::Retries in Dockerfiles
A transient Debian/Ubuntu mirror fetch aborts a docker build layer with exit 100 (it killed the web-app-nextcloud swarm openldap build while the same image built fine elsewhere). New lint under tests/lint/docker/dockerfile/apt/ flags any RUN with apt-get update/install that omits Acquire::Retries; retrofit all 15 apt Dockerfiles with -o Acquire::Retries=3. Both apt lints move into the apt/ subpackage. dnf retries by default and apk has no equivalent flag, so both stay out of scope.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-21 03:01:34 +02:00

39 lines
1.0 KiB
Docker

ARG ODOO_IMAGE
ARG ODOO_VERSION
ARG ODOO_ENTRYPOINT_SCRIPT_HOST_REL
ARG ODOO_ENTRYPOINT_SCRIPT_DOCKER
FROM ${ODOO_IMAGE}:${ODOO_VERSION}
ARG ODOO_ENTRYPOINT_SCRIPT_HOST_REL
ARG ODOO_ENTRYPOINT_SCRIPT_DOCKER
USER root
RUN rm -rf /var/lib/apt/lists/* \
&& apt-get -o Acquire::Retries=3 update && apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
libxml2-dev \
libxmlsec1-dev \
libxmlsec1-openssl \
pkg-config \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir --break-system-packages \
python3-saml==1.16.0 \
oauthlib==3.2.2 \
requests-oauthlib==2.0.0 \
PyJWT==2.9.0
RUN mkdir -p /var/log/odoo && \
chown -R odoo:odoo /var/log/odoo
COPY volumes/addons/ /mnt/custom-addons/
COPY ${ODOO_ENTRYPOINT_SCRIPT_HOST_REL} ${ODOO_ENTRYPOINT_SCRIPT_DOCKER}
RUN chmod +x "${ODOO_ENTRYPOINT_SCRIPT_DOCKER}" \
&& ln -sf "${ODOO_ENTRYPOINT_SCRIPT_DOCKER}" /usr/local/bin/entrypoint-odoo
USER odoo
ENTRYPOINT ["/usr/local/bin/entrypoint-odoo"]
CMD ["odoo"]