Skip to content

Commit 38f49df

Browse files
author
Vitaliy Siomochkin
committed
fix git support
1 parent 1f7fd5e commit 38f49df

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
# Build stage
2-
FROM ghcr.io/getzola/zola:v0.17.1 as zola
2+
FROM debian:bullseye-slim as builder
3+
4+
# Install necessary tools
5+
RUN apt-get update && apt-get install -y git wget
6+
7+
# Install Zola
8+
RUN wget https://github.com/getzola/zola/releases/download/v0.17.1/zola-v0.17.1-x86_64-unknown-linux-gnu.tar.gz && \
9+
tar -xzf zola-v0.17.1-x86_64-unknown-linux-gnu.tar.gz && \
10+
mv zola /usr/local/bin/zola
311

412
WORKDIR /project
513
COPY . .
614

7-
# Ensure Git is available
8-
RUN apt-get update && apt-get install -y git
9-
1015
# Initialize and update submodules
1116
RUN git submodule update --init --recursive
1217

1318
# Build the site
14-
RUN ["zola", "build"]
19+
RUN zola build
1520

1621
# Serve stage
1722
FROM ghcr.io/static-web-server/static-web-server:2
1823
WORKDIR /
19-
COPY --from=zola /project/public /public
24+
COPY --from=builder /project/public /public
2025

2126
# Optional: Expose a port if necessary, e.g., 80 or 8080
2227
EXPOSE 80

0 commit comments

Comments
 (0)