Skip to content

Commit 2c75e72

Browse files
committed
fix: make sure that docker image has full/correct groonga/pgroonga handling
1 parent 07dea90 commit 2c75e72

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

Dockerfile-15

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,20 @@ RUN nix profile install .#wal-g-3 && \
122122

123123
RUN nix store gc
124124

125+
WORKDIR /
126+
####################
127+
# setup-groonga
128+
####################
129+
FROM base as groonga
130+
131+
WORKDIR /nixpg
132+
133+
RUN nix profile install .#supabase-groonga && \
134+
mkdir -p /tmp/groonga-plugins && \
135+
cp -r /nix/var/nix/profiles/default/lib/groonga/plugins /tmp/groonga-plugins/
136+
137+
RUN nix store gc
138+
125139
WORKDIR /
126140
# ####################
127141
# # Download gosu for easy step-down from root
@@ -153,6 +167,7 @@ FROM gosu as production
153167
RUN id postgres || (echo "postgres user does not exist" && exit 1)
154168
# # Setup extensions
155169
COPY --from=walg /tmp/wal-g /usr/local/bin/
170+
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
156171

157172
# # Initialise configs
158173
COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -216,4 +231,7 @@ ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive
216231
RUN mkdir -p /usr/share/postgresql/extension/ && \
217232
ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
218233
chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
234+
235+
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
236+
219237
CMD ["postgres", "-D", "/etc/postgresql"]

Dockerfile-17

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,20 @@ RUN nix profile install .#wal-g-3 && \
126126

127127
RUN nix store gc
128128

129+
WORKDIR /
130+
####################
131+
# setup-groonga
132+
####################
133+
FROM base as groonga
134+
135+
WORKDIR /nixpg
136+
137+
RUN nix profile install .#supabase-groonga && \
138+
mkdir -p /tmp/groonga-plugins && \
139+
cp -r /nix/var/nix/profiles/default/lib/groonga/plugins /tmp/groonga-plugins/
140+
141+
RUN nix store gc
142+
129143
WORKDIR /
130144
# ####################
131145
# # Download gosu for easy step-down from root
@@ -157,6 +171,7 @@ FROM gosu as production
157171
RUN id postgres || (echo "postgres user does not exist" && exit 1)
158172
# # Setup extensions
159173
COPY --from=walg /tmp/wal-g /usr/local/bin/
174+
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160175

161176
# # Initialise configs
162177
COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -229,4 +244,7 @@ ENV LOCALE_ARCHIVE /usr/lib/locale/locale-archive
229244
RUN mkdir -p /usr/share/postgresql/extension/ && \
230245
ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
231246
chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
247+
248+
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
249+
232250
CMD ["postgres", "-D", "/etc/postgresql"]

Dockerfile-orioledb-17

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,20 @@ RUN nix profile install .#wal-g-3 && \
126126

127127
RUN nix store gc
128128

129+
WORKDIR /
130+
####################
131+
# setup-groonga
132+
####################
133+
FROM base as groonga
134+
135+
WORKDIR /nixpg
136+
137+
RUN nix profile install .#supabase-groonga && \
138+
mkdir -p /tmp/groonga-plugins && \
139+
cp -r /nix/var/nix/profiles/default/lib/groonga/plugins /tmp/groonga-plugins/
140+
141+
RUN nix store gc
142+
129143
WORKDIR /
130144
# ####################
131145
# # Download gosu for easy step-down from root
@@ -157,6 +171,7 @@ FROM gosu as production
157171
RUN id postgres || (echo "postgres user does not exist" && exit 1)
158172
# # Setup extensions
159173
COPY --from=walg /tmp/wal-g /usr/local/bin/
174+
COPY --from=groonga /tmp/groonga-plugins/plugins /usr/lib/groonga/plugins
160175

161176
# # Initialise configs
162177
COPY --chown=postgres:postgres ansible/files/postgresql_config/postgresql.conf.j2 /etc/postgresql/postgresql.conf
@@ -235,4 +250,6 @@ RUN mkdir -p /usr/share/postgresql/extension/ && \
235250
ln -s /usr/lib/postgresql/bin/pgsodium_getkey.sh /usr/share/postgresql/extension/pgsodium_getkey && \
236251
chmod +x /usr/lib/postgresql/bin/pgsodium_getkey.sh
237252

253+
ENV GRN_PLUGINS_DIR=/usr/lib/groonga/plugins
254+
238255
CMD ["postgres", "-D", "/etc/postgresql"]

0 commit comments

Comments
 (0)