Coder Social home page Coder Social logo

teagan42 / android-studio-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deadolus/android-studio-docker

0.0 3.0 0.0 14 KB

Android Studio in Docker. Emulator works too - with or without Display, even over SSH if you forward the display

License: Apache License 2.0

Shell 100.00%

android-studio-docker's Introduction

Android-Studio docker container

Complete Android-Studio in a Docker container. You can even start an Emulator inside it.

If you don't have a display the Emulator can run with a "dummy" display - perfect for continous integration.

Tested on Linux only.

Building

Just run "./build.sh", or "docker build -t deadolus/android-studio ." directly. An already built version is also on Docker Hub. So you may also run "docker pull deadolus/android-studio". You may of course change the name of the container.

Running

Run

"HOST_DISPLAY=1 ./run.sh"

or run directly via

"docker run -i $AOSP_ARGS -v pwd/studio-data:/studio-data --privileged --group-add plugdev deadolus/android-studio"

run.sh has some options which you can set via Environment variables.

  • NO_TTY - Do not run docker with -t flag
  • DOCKERHOSTNAME - set Docker Hostname. I use it to run tests headless
  • HOST_USB - Use the USB of the Host (useful if you want your physical device to be recognized by adb inside the container)
  • HOST_NET - Use the network of the host
  • HOST_DISPLAY - Allow the container to use the Display of the host. E.g. Let the emulator run on the Hosts Display environment.

You may use a Variable like this: "HOST_NET=1 ./run.sh"

The default docker entrypoint tries to start android-studio. So it probably does not make sense to try starting via run.sh without HOST_DISPLAY=1. If you just want a shell in the container, without starting Android Studio, run "./run.sh bash" to bypass starting Android Studio

Additional information - continous integration

I included a script under provisioning/ndkTests.sh which demonstrates how you may use this container in a CI environment. The script starts a headless container, if the HOSTNAME variable is set to CI. It then changes in to a directory (workspace/GoogleTestApp) where it builds and installs an app. It parses logcat for lines containing a string (GoogleTest), uninstalls the app and does some analysis on the parsed lines. While this script probably does not make much sense FOR YOU, it might be useful as a guiding point for you.

android-studio-docker's People

Contributors

deadolus avatar

Watchers

 avatar  avatar  avatar

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.