From 384a0a903807fbc8a432feb449cd37019a7dd9f6 Mon Sep 17 00:00:00 2001 From: "nicolas.dorier" Date: Sun, 3 Oct 2021 01:01:22 +0900 Subject: [PATCH] Add documentation if postgres update fail on rapsberry pi 4 --- Generated/postgres/migrate-docker-entrypoint.sh | 5 ++++- Production/postgres/migrate-docker-entrypoint.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Generated/postgres/migrate-docker-entrypoint.sh b/Generated/postgres/migrate-docker-entrypoint.sh index f574ec8..9b410d2 100755 --- a/Generated/postgres/migrate-docker-entrypoint.sh +++ b/Generated/postgres/migrate-docker-entrypoint.sh @@ -11,7 +11,10 @@ fi if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ [[ "$CURRENT_PGVERSION" != "" ]]; then sed -i "s/$/ $CURRENT_PGVERSION/" /etc/apt/sources.list.d/pgdg.list - apt-get update + if ! apt-get update; then + echo "apt-get update failed. Are you using raspberry pi 4? If yes, please follow https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/" + exit 1 + fi if ! apt-get install -y --no-install-recommends \ postgresql-$CURRENT_PGVERSION \ postgresql-contrib-$CURRENT_PGVERSION; then diff --git a/Production/postgres/migrate-docker-entrypoint.sh b/Production/postgres/migrate-docker-entrypoint.sh index f574ec8..9b410d2 100755 --- a/Production/postgres/migrate-docker-entrypoint.sh +++ b/Production/postgres/migrate-docker-entrypoint.sh @@ -11,7 +11,10 @@ fi if [[ "$CURRENT_PGVERSION" != "$EXPECTED_PGVERSION" ]] && \ [[ "$CURRENT_PGVERSION" != "" ]]; then sed -i "s/$/ $CURRENT_PGVERSION/" /etc/apt/sources.list.d/pgdg.list - apt-get update + if ! apt-get update; then + echo "apt-get update failed. Are you using raspberry pi 4? If yes, please follow https://blog.samcater.com/fix-workaround-rpi4-docker-libseccomp2-docker-20/" + exit 1 + fi if ! apt-get install -y --no-install-recommends \ postgresql-$CURRENT_PGVERSION \ postgresql-contrib-$CURRENT_PGVERSION; then