-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile-cordova
29 lines (25 loc) · 1.11 KB
/
Dockerfile-cordova
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
# Node 18, API:27-34
FROM cimg/android:2023.08-browsers
WORKDIR /home/circleci/project
USER circleci
RUN npm install cordova@12
ENV PATH=$PATH:/home/circleci/project/node_modules/cordova/bin/
ENV ENVIRONMENT=staging
RUN cordova telemetry off
COPY --chown=circleci . /home/circleci/project/
# docker build -f Dockerfile-cordova -t app.goodcity.hk:latest .
# docker run -it app.goodcity.hk:latest /bin/bash
# cordova build android --debug --device
# With Gradle stacktrace (useful for build errors)
# cd platforms/android
# ./gradlew --info cdvBuildDebug -b build.gradle
# Gradle logs are in ~/.gradle/daemon
# ADVANCED USAGE KEEPS IMAGE RUNNING TO MAINTAIN GRADLE CACHE
# ENVIRONMENT=staging EMBER_CLI_CORDOVA=1 yarn run ember build
# cd cordova
# ln -s ../dist www
# cordova platform add android@12
# cd ../
# docker run -i -v `pwd`/dist/:/home/circleci/project/dist/ -v `pwd`/cordova:/home/circleci/project/cordova/ -w /home/circleci/project/cordova/ -u root -t app.goodcity.hk:latest /bin/bash
# cordova build android --debug --device
# App located in `pwd`/cordova/platforms/android/app/build/outputs/apk/debug/app-debug.apk