-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.emulator-agent
More file actions
33 lines (25 loc) · 963 Bytes
/
Dockerfile.emulator-agent
File metadata and controls
33 lines (25 loc) · 963 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
30
31
# Simplified Dockerfile for emulator with agent
FROM budtmo/docker-android:latest
# Set working directory
WORKDIR /app
# Install Node.js using the method that works with this base image
RUN apt-get update && \
apt-get install -y --no-install-recommends curl ca-certificates gnupg && \
curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy agent files
COPY agent/package.json agent/tsconfig.json ./
COPY agent/src ./src
# Install dependencies and build
RUN npm install && npm run build
# Create entrypoint that starts agent after emulator is ready
RUN echo '#!/bin/bash\n\
echo "Waiting for emulator to be ready..."\n\
sleep 60\n\
echo "Starting WhatsApp agent..."\n\
cd /app && node dist/index.js\n\
' > /start-agent.sh && chmod +x /start-agent.sh
# Keep original entrypoint for emulator, agent will start separately
CMD ["/start-agent.sh"]