Code Monkey home page Code Monkey logo

Comments (7)

master-bob avatar master-bob commented on August 14, 2024

Hi AlbertShen0211,

Unless you are making changes to the Dockerfile yourself, there is usually no reason to build the image. (Building takes more than 20 minutes, about 30 for me locally and 18 or so via Github Actions, quality of internet is a factor as well). You can just pull the image, which is just a download, and then use the already built image.

You pull the image by:

docker pull mingc/android-build-box:latest

or you can specify the specific tag

docker pull mingc/android-build-box:1.25.0

Then you can use the image by doing something like the following:

$ cd <project_working_directory>
$ docker run --rm -v `pwd`:/project  -v "$HOME/.dockercache/gradle":"/root/.gradle"   mingc/android-build-box bash -c 'cd /project; ./gradlew build'

And if this project, the docker-android-build-box, uses too many extraneous things you are free to fork this, cut out what would be the cruft for you, and then build it. If you do so, please feel free to make a PR for anything which would benefit this project.

from docker-android-build-box.

AlbertShen0211 avatar AlbertShen0211 commented on August 14, 2024

More than 10G images compiled according to the latest Dockerfile? Is ubuntu dependency necessarily included?

from docker-android-build-box.

master-bob avatar master-bob commented on August 14, 2024

Yes, a dependency on a operating system is needed. The Ubuntu 20.04 LTS image was chosen and its something <100 MB.

I'm not at my computer at the moment so from what I remember the main offenders for this image are something like platform Tools ~6G, Ndk ~2GB, the build tools ~4GB, and Flutter ~2gb. If you have the image you can run some variation of du - h --max-depth=4 from / to see for yourself.

from docker-android-build-box.

master-bob avatar master-bob commented on August 14, 2024

1.25.0 Disk usage:

  • ~1GB JVMs
  • 1.7G Flutter
  • 5.8G Android SDK Tools
    • 1.7G NDK
    • 2.1G Build Tools
    • 1.2G Platforms
    • 663M Emulator

For a complete listing see the attached file. I ran something like du -h --max-depth=4 -c in /, and I got a total of 11G, so I'm not sure what's up with the discrepancy between that and what docker images lists 1.25.0 as 16.2GB.

from docker-android-build-box.

AlbertShen0211 avatar AlbertShen0211 commented on August 14, 2024

Can this project image be built using Kaniko tools?

from docker-android-build-box.

master-bob avatar master-bob commented on August 14, 2024

In theory sure.

from docker-android-build-box.

github-actions avatar github-actions commented on August 14, 2024

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days.

from docker-android-build-box.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.