-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (44 loc) · 1.77 KB
/
Dockerfile
File metadata and controls
53 lines (44 loc) · 1.77 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
45
46
47
48
49
50
51
52
53
FROM ubuntu:22.04
# Install dependencies including network diagnostic tools
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
iproute2 \
net-tools \
iputils-ping \
conntrack \
iptables \
tcpdump \
&& rm -rf /var/lib/apt/lists/*
# Build arguments
ARG DEVICELAB_URL
ARG TEST_NODE_PORT=4723
# Set environment variables
ENV DEVICELAB_URL=${DEVICELAB_URL}
ENV TEST_NODE_PORT=${TEST_NODE_PORT}
ENV NETWORK_MODE=host
# Configure sysctl settings for better network performance
# These will be applied if the container has the necessary privileges
RUN echo "net.core.rmem_default=1048576" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.core.wmem_default=1048576" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.core.rmem_max=2097152" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.core.wmem_max=2097152" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.core.netdev_max_backlog=5000" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.ipv4.udp_rmem_min=8192" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.ipv4.udp_wmem_min=8192" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.ipv4.tcp_mtu_probing=1" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.netfilter.nf_conntrack_udp_timeout=300" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.netfilter.nf_conntrack_udp_timeout_stream=300" >> /etc/sysctl.d/99-webrtc.conf && \
echo "net.netfilter.nf_conntrack_max=65536" >> /etc/sysctl.d/99-webrtc.conf
# Create directory structure
RUN mkdir -p /root/Downloads
WORKDIR /root
# Copy APK file
COPY app-release.apk /root/Downloads/app-release.apk
# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose test node port
EXPOSE ${TEST_NODE_PORT}
# Start DeviceLab test node
ENTRYPOINT ["/entrypoint.sh"]