All Projects → kylemanna → Docker Aosp

kylemanna / Docker Aosp

Licence: mit
🏗 Minimal Android AOSP build environment with handy automation wrapper scripts

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Docker Aosp

Pg timetable
pg_timetable: Advanced scheduling for PostgreSQL
Stars: ✭ 382 (-13.18%)
Mutual labels:  docker-image
Gitlab Ci Android
GitLab CI image for building Android apps
Stars: ✭ 399 (-9.32%)
Mutual labels:  docker-image
Docker Puppeteer
docker image with Google Puppeteer installed
Stars: ✭ 415 (-5.68%)
Mutual labels:  docker-image
Please Contain Yourself
A Docker tutorial written for people who don't actually know Docker already.
Stars: ✭ 385 (-12.5%)
Mutual labels:  docker-image
Aspect Injector
AOP framework for .NET (c#, vb, etc)
Stars: ✭ 398 (-9.55%)
Mutual labels:  wrapper
Trashemail
A hosted disposable email telegram bot; Extremely privacy friendly; Proudly hosted for community.
Stars: ✭ 408 (-7.27%)
Mutual labels:  docker-image
Mongo Seeding
The ultimate solution for populating your MongoDB database.
Stars: ✭ 375 (-14.77%)
Mutual labels:  docker-image
Globjects
C++ library strictly wrapping OpenGL objects.
Stars: ✭ 431 (-2.05%)
Mutual labels:  wrapper
Matchering
🎚️ Open Source Audio Matching and Mastering
Stars: ✭ 398 (-9.55%)
Mutual labels:  docker-image
Magento2
Docker Image to Magento 2 local development in Mac, Linux and Windows
Stars: ✭ 412 (-6.36%)
Mutual labels:  docker-image
Docker Guacamole
A self-contained guacamole docker container for x64 and ARM. Remotely connect over SSH, RDP or VNC using HTML5.
Stars: ✭ 389 (-11.59%)
Mutual labels:  docker-image
Docker Bitcoind
💰 Bitcoind Docker image that runs the Bitcoin node in a container for easy deployment
Stars: ✭ 391 (-11.14%)
Mutual labels:  docker-image
Docker Ipsec Vpn Server
Docker image to run an IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Stars: ✭ 4,356 (+890%)
Mutual labels:  docker-image
Fluentd Docker Image
Docker image for Fluentd
Stars: ✭ 383 (-12.95%)
Mutual labels:  docker-image
Scfacebook
The SCFacebook 4.1 is a simple and cleaner to use the api facebook-ios-sdk Objective-C Wrapper (https://github.com/facebook/facebook-ios-sdk) to perform login, get friends list, information about the user and posting on the wall with ^Block for iPhone. Suporte 4.71 FBSDKCoreKit, FBSDKShareKit and FBSDKLoginKit. Facebook SDK
Stars: ✭ 420 (-4.55%)
Mutual labels:  wrapper
Awesome Docker
🐳 A curated list of Docker resources and projects
Stars: ✭ 20,870 (+4643.18%)
Mutual labels:  docker-image
Arch Delugevpn
Docker build script for Arch Linux base with Deluge, Privoxy and OpenVPN
Stars: ✭ 404 (-8.18%)
Mutual labels:  docker-image
Containers
Bioinformatics containers
Stars: ✭ 435 (-1.14%)
Mutual labels:  docker-image
Jsstore
A complete IndexedDB wrapper with SQL like syntax.
Stars: ✭ 430 (-2.27%)
Mutual labels:  wrapper
Docker Pm2
🐳 Official Docker Image for PM2 runtime
Stars: ✭ 412 (-6.36%)
Mutual labels:  docker-image

Android Open Source Project Docker Build Environment

Docker Stars Docker Pulls ImageLayers

Minimal build environment for AOSP with handy automation wrapper scripts.

Developers can use the Docker image to build directly while running the distribution of choice, without having to worry about breaking the delicate AOSP build due to package updates as is sometimes common on bleeding edge rolling distributions like Arch Linux.

Production build servers and integration test servers should also use the same Docker image and environment. This eliminates most surprise breakages by by empowering developers and production builds to use the exact same environment. The devs will catch the issues with build environment first.

This works well on Linux. Running this via boot2docker (and friends) will result in a very painful performacne hit due to VirtualBox's vboxsf shared folder service which works terrible for very large file shares like AOSP. It might work, but consider yourself warned. If you're aware of another way to get around this, send a pull request!

Quickstart

For the terribly impatient.

  1. Make a directory to work and go there.

  2. Export the current directory as the persistent file store for the aosp wrapper.

  3. Run a self contained build script, which does:

    1. Attempts to fetch the aosp wrapper if not found locally.

    2. Runs the aosp wrapper with an extra argument for the docker binary and hints to the same script that when run later it's running in the docker container.

    3. The aosp wrapper then does it's magic which consists of fetching the docker image if not found and forms all the necessary docker run arguments seamlessly.

    4. The docker container runs the other half the build script which initializes the repo, fetches all source code, and builds.

    5. In parallel you are expected to be drinking because I save you some time.

       mkdir nougat ; cd nougat
       export AOSP_VOL=$PWD
       curl -O https://raw.githubusercontent.com/kylemanna/docker-aosp/master/tests/build-nougat.sh
       bash ./build-nougat.sh
      

    This takes about 2 hours to download and build on i5-2500k with 100Mb/s network connection.

How it Works

The Dockerfile contains the minimal packages necessary to build Android based on the main Ubuntu base image.

The aosp wrapper is a simple wrapper to simplify invocation of the Docker image. The wrapper ensures that a volume mount is accessible and has valid permissions for the aosp user in the Docker image (this unfortunately requires sudo). It also forwards an ssh-agent in to the Docker container so that private git repositories can be accessed if needed.

The intention is to use aosp to prefix all commands one would run in the Docker container. For example to run repo sync in the Docker container:

aosp repo sync -j2

The aosp wrapper doesn't work well with setting up environments, but with some bash magic, this can be side stepped with short little scripts. See tests/build-nougat.sh for an example of a complete fetch and build of AOSP.

Docker Compose

A Docker Compose file is provided in the root of this repository, you can tweak it as need be:

version: "2"

services:
  aosp:
    image: kylemanna/aosp:latest
    volumes:
      - /tmp/ccache:/ccache
      - ~/aosp:/aosp

Example run: docker-compose run --rm aosp repo sync -j4 -- your android build directory will be in ~/aosp.

Issues

There are some known issues with using Docker Toolbox on macOS and current virtualization technologies resulting in unusual user ID assignments and very poor performing virtualization file sharing implementations with things like VirtualBox. It's recommended to run this image completely in a virtual machine with enough space to fit the entire build (80GB+) as opposed to mapping the build to the local macOS file system via VirtualBox or similar.

Tested

  • Android Kitkat android-4.4.4_r2.0.1
  • Android Lollipop android-5.0.2_r1
  • Android Marshmallow android-6.0.1_r80
  • Android Nougat android-7.0.0_r14
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].