What happened?
I have worked through several issues trying to build the vortex server, had to add the installation of python3-pip to the dockerfile, update the version of rust being used, and modify a few RUN lines. Currently running into an issue with ninja building the libuv subproject in what seems to be mediasoup. I'm not finding much information on how to get around this after googling for a few days, hoping to get some insight here.
Dockerfile
`
Build Stage
FROM rust:latest AS build
USER 0:0
WORKDIR /home/rust
RUN apt-get update && apt-get install python3-pip -y
RUN USER=root cargo new --bin vortex
WORKDIR /home/rust/vortex
COPY Cargo.toml Cargo.lock ./
RUN cargo build --release
RUN rm src/.rs target/release/deps/vortex
COPY src ./src
RUN cargo install --locked --path .
Bundle Stage
FROM debian:bullseye
COPY --from=build /usr/local/cargo/bin/vortex ./vortex
EXPOSE 8080
ENV HTTP_HOST 0.0.0.0:8080
ENV WS_URL wss://vortex.mydomain.com
#ENV MANAGE_TOKEN
ENV RTC_MIN_PORT 10000
ENV RTC_MAX_PORT 11000
ENV DISABLE_RTP 0
CMD ["./vortex"]
`
Full output of: docker build .
dockerbuild.txt
Main error:
`[730/1021] Compiling C object subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o
FAILED: subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o
cc -Isubprojects/libuv-v1.43.0/libuv.a.p -Isubprojects/libuv-v1.43.0 -I../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0 -I../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0/include -I../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0/src -fdiagnostics-color=always -DNDEBUG -std=c89 -O3 -fPIC -pthread -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -D_POSIX_C_SOURCE=200112 -MD -MQ subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o -MF subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o.d -o subprojects/libuv-v1.43.0/libuv.a.p/src_unix_stream.c.o -c ../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0/src/unix/stream.c
../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0/src/unix/stream.c: In function ‘uv__write’:
../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0/src/unix/stream.c:929:3: error: C++ style comments are not allowed in ISO C90
929 | // XXX(jwn): this must call uv__stream_flush_write_queue(stream, n) here, since we won't generate any more events
| ^
../../../../../../../../../../../usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/subprojects/libuv-v1.43.0/src/unix/stream.c:929:3: note: (this will be reported only once per input file)
ninja: build stopped: subcommand failed.
--- stderr
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
Directory does not contain a valid build tree:
/home/rust/vortex/target/release/build/mediasoup-sys-f448789c1b12f09a/out/out/Release/build
make: *** [Makefile:226: libmediasoup-worker] Error 1
thread 'main' panicked at 'Failed to build libmediasoup-worker', /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/mediasoup-sys-0.3.3/build.rs:96:9
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
`