Created
July 27, 2016 23:53
-
-
Save rhoboro/0e85adb5b0f212af2cb076e3dfc976e2 to your computer and use it in GitHub Desktop.
AndroidアプリをビルドするDockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd ~ && | |
git clone https://github.com/pyconjp/pyconjp-android.git && | |
cd pycon-android && | |
git checkout develop && | |
./gradlew clean assembleRelease |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt-get update -y && apt-get upgrade -y && \ | |
apt-get install -y openjdk-8-jre openjdk-8-jdk lib32stdc++6 lib32z1 wget git | |
RUN cd && wget https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz && tar -zxvf android-sdk_r24.4.1-linux.tgz && \ | |
/root/android-sdk-linux/tools/android list sdk -a -e && \ | |
echo y | /root/android-sdk-linux/tools/android update sdk -a -u -t build-tools-23.0.1,build-tools-22.0.1,build-tools-19.1.0,android-16,android-19,android-21,android-22,android-23,extra-android-support,extra-android-m2repository,extra-google-m2repository,extra-google-google_play_services | |
ENV ANDROID_HOME /root/android-sdk-linux | |
COPY app-build.sh /root/ | |
COPY netrc /root/.netrc | |
CMD ["/bin/sh", "/root/app-build.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date=$(shell date +%s) | |
apk: Dockerfile app-build.sh | |
docker build -t suyamar/app-build:0.1 . | |
docker run --name="app-$(date)" suyamar/app-build:0.1 | |
docker cp app-$(date):/root/app-android/app/build/outputs/apk/app-production-release.apk . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
machine github.com | |
login | |
password |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment