Skip to content

Commit a01355d

Browse files
committed
refactor(docker): don't sed, just echo
1 parent 1e6a7d0 commit a01355d

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Dockerfile-15

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,8 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.
169169
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
170170
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
171171

172-
RUN sed -i \
173-
-e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \
174-
/etc/postgresql/postgresql.conf && \
172+
RUN \
173+
echo "unix_socket_directories = '/var/run/postgresql'" >> /etc/postgresql/postgresql.conf && \
175174
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
176175
#echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
177176
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \

Dockerfile-17

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.
173173
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
174174
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
175175

176-
RUN sed -i \
177-
-e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \
178-
/etc/postgresql/postgresql.conf && \
176+
RUN \
177+
echo "unix_socket_directories = '/var/run/postgresql'" >> /etc/postgresql/postgresql.conf && \
179178
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
180179
#echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
181180
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \

Dockerfile-orioledb-17

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,8 @@ COPY --chown=postgres:postgres ansible/files/postgresql_config/custom_walg.conf.
173173
COPY --chown=postgres:postgres ansible/files/walg_helper_scripts/wal_fetch.sh /home/postgres/wal_fetch.sh
174174
COPY ansible/files/walg_helper_scripts/wal_change_ownership.sh /root/wal_change_ownership.sh
175175

176-
RUN sed -i \
177-
-e "s|#unix_socket_directories = '/tmp'|unix_socket_directories = '/var/run/postgresql'|g" \
178-
/etc/postgresql/postgresql.conf && \
176+
RUN \
177+
echo "unix_socket_directories = '/var/run/postgresql'" >> /etc/postgresql/postgresql.conf && \
179178
echo "cron.database_name = 'postgres'" >> /etc/postgresql/postgresql.conf && \
180179
#echo "pljava.libjvm_location = '/usr/lib/jvm/java-11-openjdk-${TARGETARCH}/lib/server/libjvm.so'" >> /etc/postgresql/postgresql.conf && \
181180
echo "pgsodium.getkey_script= '/usr/lib/postgresql/bin/pgsodium_getkey.sh'" >> /etc/postgresql/postgresql.conf && \

0 commit comments

Comments
 (0)