LukeMathWalker / cargo-chef

A cargo-subcommand to speed up Rust Docker builds using Docker layer caching.
Apache License 2.0
1.72k stars 113 forks source link

latest version of once_cell not found #234

Closed bbstilson closed 1 year ago

bbstilson commented 1 year ago

I'm sure this is not specifically about once_cell but rather some deeper issue.

 > [builder 2/4] RUN cargo chef cook --release --recipe-path recipe.json:                                                                                                 
0.764     Updating crates.io index                                                                                                                                        
97.62 error: failed to select a version for the requirement `once_cell = "^1.18.0"`                                                                                       
97.62 candidate versions found which didn't match: 1.17.2, 1.17.1, 1.17.0, ...                                                                                            
97.62 location searched: crates.io index      

There is definitely a 1.18 version: https://crates.io/crates/once_cell

Building without cargo chef works. Happy to provide more details 🙂

LukeMathWalker commented 1 year ago

What version of cargo-chef are you using? What does the Dockerfile look like?

bbstilson commented 1 year ago

doh. i was building from an old image:

FROM lukemathwalker/cargo-chef:latest-rust-1.59.0 as chef

updating to 1.71 fixed the issue. thanks!

FROM lukemathwalker/cargo-chef:latest-rust-1.71.0 as chef