Created
January 20, 2021 17:20
-
-
Save fusetim/de5a9a17503e7c0d6a4e754db350abf4 to your computer and use it in GitHub Desktop.
Dockerfile for Zola (https://getzola.org)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM rust:slim AS builder | |
RUN apt-get update -y && \ | |
apt-get install -y python-pip make g++ python-setuptools libssl-dev pkg-config rsync && \ | |
pip install dockerize && \ | |
rustup target add x86_64-unknown-linux-gnu | |
WORKDIR /app | |
COPY . . | |
RUN cargo build --release --target x86_64-unknown-linux-gnu | |
RUN mv target/x86_64-unknown-linux-gnu/release/zola /usr/bin | |
RUN mkdir -p /workdir | |
WORKDIR /workdir | |
RUN dockerize -n -o /workdir /usr/bin/zola | |
FROM scratch | |
COPY --from=builder /workdir . | |
ENTRYPOINT [ "/usr/bin/zola" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment