Fix Dockerfile (#3599)

This commit is contained in:
Adrian Freund 2024-03-11 14:07:21 +01:00 committed by GitHub
parent 7f0b7a28c7
commit 515f5b6b4f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,9 +1,10 @@
FROM rust:alpine AS build
COPY . /app
WORKDIR /app
ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
RUN apk add --update musl-dev \
&& cargo build -p typst-cli --release
RUN apk add --update musl-dev openssl-dev openssl-libs-static \
&& CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse \
OPENSSL_NO_PKG_CONFIG=1 OPENSSL_STATIC=1 OPENSSL_DIR=/usr/ \
cargo build -p typst-cli --release
FROM alpine:latest
WORKDIR /root/