fix: make sure that docker image has full/correct groonga/pgroonga handling #1858
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Groonga/PGroonga Installation in Dockerfiles
Summary
This Draft PR aligns the groonga/pgroonga installation approach in Dockerfiles with the Ansible deployment method, ensuring consistent behavior across different deployment strategies.
Problem
There was an inconsistency in how groonga and pgroonga packages were being installed between Ansible-based deployments and Docker-based deployments:
Ansible Approach (Correct)
supabase-groongaas a separate Nix packageGRN_PLUGINS_DIRenvironment variable pointing to/var/lib/postgresql/.nix-profile/lib/groonga/pluginsDockerfile Approach (Incorrect)
GRN_PLUGINS_DIRenvironment variableChanges
Files Modified
Dockerfile-15Dockerfile-17Dockerfile-orioledb-17What Was Changed
For each Dockerfile:
Added dedicated groonga build stage (after the
walgstage):Copy groonga plugins to production image:
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/pluginsSet GRN_PLUGINS_DIR environment variable:
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/pluginsTesting Recommendations
GRN_PLUGINS_DIRenvironment variable is set correctly in running containers/usr/lib/groonga/pluginsRelated
This fix ensures that the pgroonga extension (configured in
ansible/files/postgresql_config/supautils.conf.j2) will work correctly in Docker-based deployments, matching the behavior of Ansible-based deployments.