-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
65 lines (50 loc) · 1.47 KB
/
Dockerfile
File metadata and controls
65 lines (50 loc) · 1.47 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
54
55
56
57
58
59
60
61
62
63
64
65
FROM node:18-alpine
LABEL maintainer="MCP Server for Android Control"
LABEL description="MCP Server with Tailscale and ADB built-in"
# Install dependencies
RUN apk add --no-cache \
bash \
tzdata \
curl \
ca-certificates \
openssh \
openrc \
iptables \
ip6tables \
unzip \
wget \
supervisor
# Install Tailscale
RUN apk add --no-cache tailscale
# Create app directory
WORKDIR /app
# Install Android SDK Platform Tools for ADB
RUN mkdir -p /opt/android-sdk && \
wget -q https://dl.google.com/android/repository/platform-tools-latest-linux.zip && \
unzip platform-tools-latest-linux.zip -d /opt/android-sdk && \
rm platform-tools-latest-linux.zip
# Add platform-tools to PATH
ENV PATH="/opt/android-sdk/platform-tools:${PATH}"
# Verify ADB installation
RUN adb version
# Copy package.json and package-lock.json
COPY package*.json ./
# Install app dependencies
RUN npm ci --only=production
# Copy the app source code
COPY server.js ./
COPY init.sh /init.sh
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Create directories
RUN mkdir -p /app/screenshots /var/run/tailscale /var/cache/tailscale /var/lib/tailscale
# Make scripts executable
RUN chmod +x /init.sh
# Expose ports
EXPOSE 3001/tcp
EXPOSE 41641/tcp
EXPOSE 41641/udp
# Set environment variables
ENV PORT=3001
ENV DEFAULT_PHONE_IP="100.77.199.68"
# Start the services with supervisord
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]