File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Android builds currently work well with JDK 17 for modern AGP
22FROM eclipse-temurin:21-jdk-jammy
33
4+ # Limit Java memory usage (adjust values as needed)
5+ ENV JAVA_OPTS="-Xmx256m -Xms128m -XX:MaxMetaspaceSize=128m"
6+ ENV GRADLE_OPTS="-Xmx256m -Xms128m -XX:MaxMetaspaceSize=128m -Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dorg.gradle.workers.max=1 -Dorg.gradle.jvmargs=-Xmx256m"
7+
48ARG ANDROID_SDK_ROOT=/opt/android-sdk
59ENV ANDROID_SDK_ROOT=${ANDROID_SDK_ROOT}
610ENV ANDROID_HOME=${ANDROID_SDK_ROOT}
@@ -93,11 +97,10 @@ RUN CHROME_PATH=$(find /root/.cache/puppeteer -name chrome -type f | head -n 1)
9397# Create entrypoint script that sources the environment
9498RUN echo '#!/bin/sh\n \
9599 export PUPPETEER_EXECUTABLE_PATH=$(find /root/.cache/puppeteer -name chrome -type f | head -n 1)\n \
96- exec node /app/dist/index.js "$@"' > /entrypoint.sh && \
100+ exec "$@"' > /entrypoint.sh && \
97101 chmod +x /entrypoint.sh
98102
99103EXPOSE 4000
100104
101105ENTRYPOINT ["/entrypoint.sh" ]
102-
103- CMD ["serve" , "--port" , "4000" ]
106+ CMD ["sh" , "-c" , "node /app/dist/index.js serve --port ${PORT:-4000}" ]
You can’t perform that action at this time.
0 commit comments