forked from infosave2007/aivpn
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.client
More file actions
44 lines (34 loc) · 1.01 KB
/
Copy pathDockerfile.client
File metadata and controls
44 lines (34 loc) · 1.01 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# AIVPN Client Test Dockerfile
FROM rust:1.86-slim AS builder
WORKDIR /app
RUN apt-get update && apt-get install -y \
pkg-config \
libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy entire workspace (needed for Cargo.toml workspace resolution)
COPY Cargo.toml ./
COPY Cargo.lock* ./
COPY aivpn-common aivpn-common/
COPY aivpn-client aivpn-client/
COPY aivpn-server aivpn-server/
COPY aivpn-android-core aivpn-android-core/
COPY aivpn-windows aivpn-windows/
COPY mask-assets mask-assets/
RUN cargo build --release --bin aivpn-client
# Stage 2: Runtime
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y \
ca-certificates \
iproute2 \
iptables \
iputils-ping \
curl \
netcat-openbsd \
bc \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY --from=builder /app/target/release/aivpn-client /usr/local/bin/aivpn-client
RUN mkdir -p /dev/net && \
mknod /dev/net/tun c 10 200 2>/dev/null || true && \
chmod 600 /dev/net/tun
ENTRYPOINT ["/usr/local/bin/aivpn-client"]