From f298e4a2a67a0f19e0e0967efd089562527af658 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 7 Apr 2026 10:54:22 +0100 Subject: [PATCH] fix: resolve heredoc parsing error in deploy-oci Makefile target Extract inline Dockerfile to Dockerfile.oci and scp it instead of generating it via heredoc over SSH. Make's line-continuation backslash was causing the heredoc delimiter to be parsed as 'DEOFnFROM' by the remote shell, breaking the image build step. --- Dockerfile.oci | 9 +++++++++ Makefile | 13 ++----------- 2 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 Dockerfile.oci diff --git a/Dockerfile.oci b/Dockerfile.oci new file mode 100644 index 0000000..69c9ae3 --- /dev/null +++ b/Dockerfile.oci @@ -0,0 +1,9 @@ +FROM alpine:3.21 +RUN apk add --no-cache git ca-certificates +WORKDIR /app +COPY repo-vis-server ./ +COPY dist ./web/dist/ +ENV PORT=8080 +ENV FRONTEND_DIR=./web/dist +EXPOSE 8080 +CMD ["./repo-vis-server"] diff --git a/Makefile b/Makefile index 124a57a..5153e60 100644 --- a/Makefile +++ b/Makefile @@ -39,18 +39,9 @@ deploy-oci: build-arm ssh $(OCI_HOST) "rm -rf $(OCI_TMP) && mkdir -p $(OCI_TMP)" scp server/target/$(MUSL_TARGET_ARM)/release/repo-vis-server $(OCI_HOST):$(OCI_TMP)/ cd web && tar czf /tmp/_rv_dist.tar.gz dist && scp /tmp/_rv_dist.tar.gz $(OCI_HOST):$(OCI_TMP)/ + scp Dockerfile.oci $(OCI_HOST):$(OCI_TMP)/Dockerfile @echo "==> Building image on OCI..." - ssh $(OCI_HOST) 'cd $(OCI_TMP) && tar xzf _rv_dist.tar.gz && cat > Dockerfile <