Files
computer-playbook/roles/web-app-decidim/files/Dockerfile
kevinveenbirkenbachandClaude Opus 5 b192415a5b fix(decidim): take the ruby fragment path from its one source
patch.py located files/ruby/ relative to its own __file__. That holds in
the repo, where the script sits next to the fragments, but the image
copies the script to /tmp/patch.py and the fragments to /tmp/ruby/, so
parent.parent resolved to / and the build died with
FileNotFoundError: /ruby/omniauth_provider.rb on every retry.

DECIDIM_PATCH_RUBY_DOCKER already decides where the COPY puts the
fragments. Reading it in the script makes that variable the only place
the location is stated, so the layout can change without a second
place silently disagreeing. Missing variable raises instead of
guessing.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-22 13:03:48 +02:00

17 lines
612 B
Docker

ARG DECIDIM_IMAGE
ARG DECIDIM_VERSION
FROM ${DECIDIM_IMAGE}:${DECIDIM_VERSION}
ARG DECIDIM_PATCH_SCRIPT_HOST_REL
ARG DECIDIM_PATCH_SCRIPT_DOCKER
ARG DECIDIM_PATCH_RUBY_HOST_REL
ARG DECIDIM_PATCH_RUBY_DOCKER
RUN echo "gem 'omniauth_openid_connect'" >> /code/Gemfile && \
echo "gem 'aws-sdk-s3', require: false" >> /code/Gemfile && \
cd /code && bundle install --quiet
COPY ${DECIDIM_PATCH_SCRIPT_HOST_REL} ${DECIDIM_PATCH_SCRIPT_DOCKER}
COPY ${DECIDIM_PATCH_RUBY_HOST_REL}/ ${DECIDIM_PATCH_RUBY_DOCKER}/
RUN DECIDIM_PATCH_RUBY_DOCKER=${DECIDIM_PATCH_RUBY_DOCKER} python3 ${DECIDIM_PATCH_SCRIPT_DOCKER}