From 57ada7307f3c129c2551b03e22d3dca4a52d3a06 Mon Sep 17 00:00:00 2001 From: brooke Date: Sun, 13 Apr 2025 16:32:01 -0400 Subject: [PATCH] format dockerfile and install rsync --- Dockerfile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f3442a3..43c49ea 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,25 +3,27 @@ FROM rust:slim-bookworm AS builder ARG USE_GH_RELEASE=false ARG ZOLA_RELEASE_VERSION=latest RUN apt-get update -y && \ - apt-get install -y pkg-config make g++ libssl-dev curl jq tar gzip + apt-get install -y pkg-config make g++ libssl-dev curl jq tar gzip WORKDIR /app COPY . . RUN if [ "${USE_GH_RELEASE}" = "true" ]; then \ if [ "${ZOLA_RELEASE_VERSION}" = "latest" ]; then \ - export ZOLA_VERSION=$(curl -sL https://api.github.com/repos/getzola/zola/releases/latest | jq -r .name); \ + export ZOLA_VERSION=$(curl -sL https://api.github.com/repos/getzola/zola/releases/latest | jq -r .name); \ else \ - export ZOLA_VERSION="${ZOLA_RELEASE_VERSION}"; \ + export ZOLA_VERSION="${ZOLA_RELEASE_VERSION}"; \ fi && \ curl -sL --fail --output zola.tar.gz https://github.com/getzola/zola/releases/download/${ZOLA_VERSION}/zola-${ZOLA_VERSION}-$(uname -m)-unknown-linux-gnu.tar.gz && \ tar -xzvf zola.tar.gz zola; \ - else \ + else \ cargo build --release && \ cp target/$(uname -m)-unknown-linux-gnu/release/zola zola; \ - fi && ./zola --version + fi && ./zola --version FROM gcr.io/distroless/cc-debian12 COPY --from=builder /app/zola /bin/zola +RUN apt-get update -y && \ + apt-get install rsync ENTRYPOINT ["/bin/bash", "-l", "-c"]