-
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (21 loc) · 742 Bytes
/
Dockerfile
File metadata and controls
30 lines (21 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM ubuntu:24.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
network-manager \
dbus \
build-essential \
curl \
pkg-config \
libdbus-1-dev \
&& rm -rf /var/lib/apt/lists/*
# Rust toolchain
# Pinned this to avoid cross-device rename failures on runtime updates
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain 1.94.0
ENV PATH="/root/.cargo/bin:${PATH}"
# DBus runtime dirs
RUN mkdir -p /run/dbus /run/NetworkManager
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY nmrs ./nmrs
ENV CARGO_NET_OFFLINE=false
CMD ["sh", "-c", "dbus-daemon --system --fork && sleep 1 && NetworkManager --no-daemon & sleep 3 && cargo test -p nmrs"]