update mingw builder

This commit is contained in:
DefectingCat
2023-05-09 14:41:59 +08:00
parent 2db53cd98e
commit 88dccb53a2

View File

@ -1,5 +1,4 @@
FROM rust:1.67-alpine as builder
RUN apk add --no-cache musl-dev sqlite-static openssl-dev openssl-libs-static pkgconf libpq-dev mingw-w64-gcc
FROM rust:latest as builder
WORKDIR /app
@ -21,11 +20,10 @@ RUN adduser \
&& echo "" >> $HOME/.cargo/config \
&& echo "[source.ustc]" >> $HOME/.cargo/config \
&& echo "registry = \"sparse+https://mirrors.ustc.edu.cn/crates.io-index/\"" >> $HOME/.cargo/config \
&& apt update \
&& apt install -y g++-mingw-w64-x86-64 \
&& rustup target add x86_64-unknown-linux-musl \
&& rustup target add x86_64-pc-windows-gnu \
&& rustup toolchain install stable-x86_64-pc-windows-gnu \
&& update-ca-certificates
COPY . .
&& rustup toolchain install stable-x86_64-pc-windows-gnu
ENTRYPOINT [ "/bin/bash" ]