https://github.com/rycus86/docker-android-studio
Docker container to run Android Studio (https://developer.android.com/studio/index.html)
https://github.com/rycus86/docker-android-studio
Last synced: 3 months ago
JSON representation
Docker container to run Android Studio (https://developer.android.com/studio/index.html)
- Host: GitHub
- URL: https://github.com/rycus86/docker-android-studio
- Owner: rycus86
- Created: 2019-05-31T12:35:24.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-04-16T20:17:30.000Z (about 4 years ago)
- Last Synced: 2025-10-10T08:11:32.115Z (8 months ago)
- Language: Dockerfile
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Docker container to run Android Studio (https://developer.android.com/studio/index.html)
## Usage
```
docker run --rm \
--privileged \
-e DISPLAY=${DISPLAY} \
--device /dev/dri \
--device /dev/video0 \
--device /dev/snd \
--device /dev/kvm \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /dev/bus/usb:/dev/bus/usb \
-v /usr/share/X11/xkb:/usr/share/X11/xkb:ro \
-v ~/.AndroidStudio:/home/developer/.AndroidStudio \
-v ~/.AndroidStudio.android:/home/developer/.android \
-v ~/.AndroidStudio.java:/home/developer/.java \
-v ~/.AndroidStudio.gradle:/home/developer/.gradle \
-v ~/.AndroidStudio.sdk:/home/developer/Android/Sdk \
-v ~/Project:/home/developer/Project \
--name androidstudio-$(head -c 4 /dev/urandom | xxd -p)-$(date +'%Y%m%d-%H%M%S') \
rycus86/androidstudio:3.4
```
Explanation:
- `--privileged` - to have access to USB devices connected to the host .AndroidStudio* folders to keep the data on the host between different instances (like SDK tools, AVDs, etc.)
- Local project directories need to be mounted into the container
- The name can be anything - I used something random to be able to start multiple instances if needed
## Notes
The container has Git installed. It also has Kotlin installed. The container runs as a non-root user but that user is part of the root group to be able to use KVM. When Android Studio starts for the first time it might display a warning about KVM not working but it does actually.