mirror of
https://github.com/nestriness/nestri.git
synced 2025-12-12 08:45:38 +02:00
✨ feat: Add a separate image to build warp (#23)
## Description **What(what issue does this code solve/what feature does it add):** Build times for netris:server are way too long. so the idea is to move warp into it's own container then build from there. Later on first release we might drop this for a better solution. **How(how does it solve it):** 1. Added the very own netris:warp ## Required Checklist: - [x] I have added any necessary documentation and comments in my code (where appropriate) - [x] I have added tests to make sure my code runs in all contexts ## Further comments
This commit is contained in:
13
warp.Dockerfile
Normal file
13
warp.Dockerfile
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM rust:bookworm as builder
|
||||
|
||||
# Create a build directory and copy over all of the files
|
||||
WORKDIR /build
|
||||
COPY ./moq-server/ ./
|
||||
# Reuse a cache between builds.
|
||||
# I tried to `cargo install`, but it doesn't seem to work with workspaces.
|
||||
# There's also issues with the cache mount since it builds into /usr/local/cargo/bin
|
||||
# We can't mount that without clobbering cargo itself.
|
||||
# We instead we build the binaries and copy them to the cargo bin directory.
|
||||
RUN --mount=type=cache,target=/usr/local/cargo/registry \
|
||||
--mount=type=cache,target=/build/target \
|
||||
cargo build --manifest-path ./moq-pub/Cargo.toml --target x86_64-unknown-linux-gnu --release && cp target/x86_64-unknown-linux-gnu/release/moq-pub /usr/bin/warp
|
||||
Reference in New Issue
Block a user