Dockerfile 1.6 KB

123456789101112131415161718192021222324252627282930313233
  1. # This Dockerfile creates a static build image for CI
  2. FROM openjdk:8-jdk
  3. # Just matched `app/build.gradle`
  4. ENV ANDROID_COMPILE_SDK "28"
  5. # Just matched `app/build.gradle`
  6. ENV ANDROID_BUILD_TOOLS "28.0.3"
  7. # Version from https://developer.android.com/studio/releases/sdk-tools
  8. ENV ANDROID_SDK_TOOLS "24.4.1"
  9. ENV ANDROID_HOME /android-sdk-linux
  10. ENV PATH="${PATH}:/android-sdk-linux/platform-tools/"
  11. # install OS packages
  12. RUN apt-get --quiet update --yes
  13. RUN apt-get --quiet install --yes wget apt-utils tar unzip lib32stdc++6 lib32z1 build-essential ruby ruby-dev
  14. # We use this for xxd hex->binary
  15. RUN apt-get --quiet install --yes vim-common
  16. # install Android SDK
  17. RUN wget --quiet --output-document=android-sdk.tgz https://dl.google.com/android/android-sdk_r${ANDROID_SDK_TOOLS}-linux.tgz
  18. RUN tar --extract --gzip --file=android-sdk.tgz
  19. RUN echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter android-${ANDROID_COMPILE_SDK}
  20. RUN echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter platform-tools
  21. RUN echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter build-tools-${ANDROID_BUILD_TOOLS}
  22. RUN echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-android-m2repository
  23. RUN echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-google_play_services
  24. RUN echo y | android-sdk-linux/tools/android --silent update sdk --no-ui --all --filter extra-google-m2repository
  25. # install FastLane
  26. COPY Gemfile.lock .
  27. COPY Gemfile .
  28. RUN gem install bundler -v 1.16.6
  29. RUN bundle install