File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,8 +5,12 @@ COPY polardb-entrypoint.sh /usr/local/bin/polardb-entrypoint.sh
55
66RUN rpm -ivh /tmp/PolarDB-*.rpm \
77 && (id postgres >/dev/null 2>&1 || useradd -m postgres) \
8+ && POLARDB_INSTALL_DIR="$(find /u01 -maxdepth 3 -type f -path '*/bin/postgres' -print -quit | sed 's#/bin/postgres##')" \
9+ && test -n "$POLARDB_INSTALL_DIR" \
10+ && if [ "$POLARDB_INSTALL_DIR" != "/u01/polardb_pg" ]; then ln -sfn "$POLARDB_INSTALL_DIR" /u01/polardb_pg; fi \
811 && mkdir -p /var/lib/polardb \
9- && chown -R postgres:postgres /var/lib/polardb /u01/polardb_pg \
12+ && chown -R postgres:postgres /var/lib/polardb "$POLARDB_INSTALL_DIR" \
13+ && chown -h postgres:postgres /u01/polardb_pg \
1014 && chmod +x /usr/local/bin/polardb-entrypoint.sh \
1115 && rm -f /tmp/PolarDB-*.rpm
1216
You can’t perform that action at this time.
0 commit comments