From 08cffb8742a752f61e3442c71be9bb08d8ad3244 Mon Sep 17 00:00:00 2001 From: c01o Date: Tue, 24 Oct 2023 19:58:23 +0900 Subject: [PATCH] Fix docker build Lack of `fi` resulted in a syntax error. Also, change `;` to `||` to ensure it builds successfully on architectures other than `linux/arm/v7`. ``` [2023-10-24T10:46:49.941Z] ------ > [dev_container_auto_added_stage_label 11/18] RUN mkdir -p "/home/archivebox/.config/chromium/Crash Reports/pending/" && chown -R archivebox "/home/archivebox/.config" ; if [[ "linux/amd64" == "linux/arm/v7" ]]; then $exit 0; else exit 1: 0.401 /bin/bash: -c: line 2: syntax error: unexpected end of file ------ WARNING: buildx: git was not found in the system. Current commit information was not captured by the build [2023-10-24T10:46:49.942Z] Dockerfile-with-features:135 -------------------- 134 | && ln -s "$CHROME_BINARY" /usr/bin/chromium-browser 135 | >>> RUN mkdir -p "/home/${ARCHIVEBOX_USER}/.config/chromium/Crash Reports/pending/" \ 136 | >>> && chown -R $ARCHIVEBOX_USER "/home/${ARCHIVEBOX_USER}/.config" \ 137 | >>> ; if [[ "$TARGETPLATFORM" == "linux/arm/v7" ]]; then $exit 0; else exit 1 138 | # ignore failure for architectures where no playwright release is available yet -------------------- ERROR: failed to solve: process "/bin/bash -c mkdir -p \"/home/${ARCHIVEBOX_USER}/.config/chromium/Crash Reports/pending/\" && chown -R $ARCHIVEBOX_USER \"/home/${ARCHIVEBOX_USER}/.config\" ; if [[ \"$TARGETPLATFORM\" == \"linux/arm/v7\" ]]; then $exit 0; else exit 1" did not complete successfully: exit code: 2 ``` --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9d04023a..28019ad5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -122,7 +122,7 @@ RUN echo "[+] Installing extractor Chromium dependency..." \ && ln -s "$CHROME_BINARY" /usr/bin/chromium-browser \ && mkdir -p "/home/${ARCHIVEBOX_USER}/.config/chromium/Crash Reports/pending/" \ && chown -R $ARCHIVEBOX_USER "/home/${ARCHIVEBOX_USER}/.config" \ - ; if [[ "$TARGETPLATFORM" == "linux/arm/v7" ]]; then $exit 0; else exit 1 + || if [[ "$TARGETPLATFORM" == "linux/arm/v7" ]]; then exit 0; else exit 1; fi # ignore failure for architectures where no playwright release is available yet # Install Node dependencies