34 lines
778 B
Docker
34 lines
778 B
Docker
FROM redroid/redroid:14.0.0-latest
|
|
|
|
# Install required packages
|
|
RUN apt-get update && apt-get install -y \
|
|
curl \
|
|
wget \
|
|
unzip \
|
|
openjdk-17-jdk \
|
|
android-tools-adb \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Set up Android SDK environment
|
|
ENV ANDROID_HOME=/opt/android-sdk
|
|
ENV PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools
|
|
|
|
# Create working directory
|
|
WORKDIR /app
|
|
|
|
# Copy entrypoint script
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod +x /app/entrypoint.sh
|
|
|
|
# Create APK directory
|
|
RUN mkdir -p /app/apks
|
|
|
|
# Expose ADB ports
|
|
EXPOSE 5555 5556
|
|
|
|
# Health check - check if redroid is running
|
|
HEALTHCHECK --interval=30s --timeout=10s --retries=5 \
|
|
CMD curl -f http://localhost:5555/ || exit 1
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|