emk / rust-musl-builder

Docker images for compiling static Rust binaries using musl-libc and musl-gcc, with static versions of useful C libraries. Supports openssl and diesel crates.
Apache License 2.0
1.54k stars 193 forks source link

rust-musl-builder and DinD CI #68

Closed kariae closed 5 years ago

kariae commented 5 years ago

Hello, I'm trying to use rust-musl-builder in my CI flow I use droneCI for that, that means I'm running a DinD so when I run rust-musl-builder cargo build --target=aarch64-unknown-linux-gnu --release I have the following error could not find Cargo.toml in /home/rust/src cause for some reason the volume doesn't mount in the last container

emk commented 5 years ago

Instead of mounting the source, you may need to ADD it using a Dockefile. See the examples/ directory. There should be a few examples of this.

kariae commented 5 years ago

Hum, that means to build the Docker image inside the integration process and the execute it, right?

emk commented 5 years ago

See the sample Dockerfile in the CI section of the README. This can probably be adapted to whatever CI system you use.

kariae commented 5 years ago

Perfect, thank you 👍