Eirik A
Eirik A
Exploring this in https://github.com/kube-rs/version-rs/pull/4 as a way to use muslrust with multi-stage builds without needing `cargo-chef`, if it works out, I'll port some docs into here.
This type of multi-stage dockerfile will work well with `DOCKER_BUILDKIT=1`: ```dockerfile FROM clux/muslrust:stable AS builder COPY Cargo.* . COPY version.rs version.rs RUN --mount=type=cache,target=/volume/target \ --mount=type=cache,target=/root/.cargo/registry \ cargo build --release --bin...
Ah. It's not supported: https://github.com/moby/buildkit/issues/1673 and https://github.com/docker/buildx/issues/399. Seems actually derided that it's even asked for lol.
ok https://github.com/moby/buildkit/issues/1512 seems a little more positive at least
No, I can actually avoid rebuilding deps and untouched files without cargo-chef: You can test it out in [version-rs](https://github.com/kube-rs/version-rs) with: ``` DOCKER_BUILDKIT=1 docker build . # full build first time...
Thank you, if you find a setup that works that would be super helpful! btw I think the complete rebuild happens when the [github cache reaches 10G](https://github.com/moby/buildkit#github-actions-cache-experimental) and it starts...
There has to be a default toolchain installed for builds to work in most places though, and the image is purposefully built with the entire toolchain. Downloading another update inside...
lol this does totally work when adding in `libpgport`, `libpgcommon` and using [goldranks fix](https://github.com/sgrif/pq-sys/pull/28/files)
Note to self; tried the other potential fix branch on pq-sys with the following diff: ```diff diff --git Dockerfile Dockerfile index de1c119..78b7253 100644 --- Dockerfile +++ Dockerfile @@ -137,6 +137,12...
Ah, thanks for this. I think it's probably better to widen the existing regex to capture it if that's possible. AFAIKT it's only the `\d` that's causing the problem, and...