Skip to content

Commit 9ff9faa

Browse files
authored
Fix: find for owner change (#61)
- and adjust warnings
1 parent 01075d8 commit 9ff9faa

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ RUN set -eux; \
2323
rm -rf /var/lib/apt/lists/*
2424

2525
# The old binaries will be in /usr/lib/postgresql/16/bin
26-
ENV PGBINOLD /usr/lib/postgresql/${POSTGRES_OLD_VERSION}/bin
27-
ENV PGBINNEW /usr/lib/postgresql/${POSTGRES_VERSION}/bin
26+
ENV PGBINOLD=/usr/lib/postgresql/${POSTGRES_OLD_VERSION}/bin
27+
ENV PGBINNEW=/usr/lib/postgresql/${POSTGRES_VERSION}/bin
2828

2929
# we are usually using /var/lib/postgresql/data as the data directory
3030
# so this is why we are using it for the 'old' version instead of the
3131
# path that is customized for the version.
32-
ENV PGDATAOLD /var/lib/postgresql/data
33-
ENV PGDATANEW /var/lib/postgresql/${POSTGRES_VERSION}/data
32+
ENV PGDATAOLD=/var/lib/postgresql/data
33+
ENV PGDATANEW=/var/lib/postgresql/${POSTGRES_VERSION}/data
3434

3535
COPY bin/upgradeversion.sh /usr/local/bin/upgradeversion
3636

@@ -39,6 +39,6 @@ COPY bin/upgradeversion.sh /usr/local/bin/upgradeversion
3939
# Change to user root user to run the commands.
4040
USER 0:0
4141
RUN groupmod -g 10002 postgres && usermod -u 10002 -g 10002 postgres && \
42-
find / -uid 999 -not -path "/proc/*" -exec chown 10002 {} \; && \
43-
find / -gid 999 -not -path "/proc/*" -exec chown :10002 {} \;
42+
find / -path /proc -prune -o -uid 999 -exec chown 10002 {} \; && \
43+
find / -path /proc -prune -o -gid 999 -exec chown :10002 {} \;
4444
USER 10002:10002

0 commit comments

Comments
 (0)