# Use an official Rust image as the base FROM rust:latest # Install dependencies RUN apt-get update && apt-get install -y \ libudev-dev \ iproute2 \ iputils-ping \ && rm -rf /var/lib/apt/lists/* # Clone the xbnet repository RUN git clone https://github.com/jgoerzen/xbnet.git /usr/src/xbnet # Build xbnet WORKDIR /usr/src/xbnet RUN cargo build && cargo build --release # Copy the built binary to /usr/local/bin RUN cp target/release/xbnet /usr/local/bin/xbnet # Create and copy the entrypoint script to root location "/" COPY ./entrypoint.sh / RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"] CMD ["bash"]