kornelski / cargo-deb

Make Debian packages directly from Rust/Cargo projects
https://lib.rs/cargo-deb
MIT License
408 stars 48 forks source link

Running inside a container #81

Closed Ludea closed 1 year ago

Ludea commented 1 year ago

I get /root/.cargo/bin/cargo-deb: 1: Syntax error: word unexpected (expecting ")") when using cargo-deb into a docker container.

I run RUN cargo deb -p mysubcrate --target aarch64-unknown-linux-musl --no-build. Same command works outside a container.

kornelski commented 1 year ago

This isn't how cargo-deb reports errors, so the error is coming from something else in your container, scripts, etc.

Ludea commented 1 year ago

My dockerfile

FROM messense/rust-musl-cross:aarch64-musl as cli
RUN sudo apt update
RUN sudo apt install -y protobuf-compiler
RUN cargo install cargo-deb
COPY . .
RUN cargo build --release --verbose
RUN cargo deb -p myfirstapp--target aarch64-unknown-linux-musl --no-build
RUN cargo deb -p mysecondapp --target aarch64-unknown-linux-musl --no-build
Ludea commented 1 year ago

Issue is not from cargo-deb

Ludea commented 1 year ago

I'm not sure. seems after cargo-deb installation, cargo doesn't recognize deb command https://github.com/Ludea/speedupdate-rs/actions/runs/4619181917/jobs/8167581018#step:8:7 2 steps before, I install cargo-deb

kornelski commented 1 year ago

What is "rgo"? Why is it running it in a new bash process, when others were not?

kornelski commented 1 year ago

I'm not providing support for GitHub actions. This is not cargo-deb problem. I can't solve it by changing cargo-deb.