docker-android Docker & Self-Hosted Deployment

GitHub

Android in docker solution with noVNC supported and video recording

15,583 stars Python Python 1 file ยท ~10,070 tokens #alibabacloud#android#android-emulator#aws#azure#cloud#docker#docker-android
RAW Compose
1. Pull Image (DOCKERHUB) docker pull hqarroum/docker-android
2. Docker Run (1-Click Launch) docker run -d --name docker-android -p 5554:5554 --restart always hqarroum/docker-android:latest
3. Podman Run podman run -d --name docker-android -p 5554:5554 --restart always hqarroum/docker-android:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/hqarroum/docker-android:latest
5. ORAS Pull (OCI Artifact) oras pull hqarroum/docker-android:latest
6. Compose Deployment docker compose up -d
docker-compose.yml
Download .yml
version: "4"
services:
  android-emulator:
    build:
      context: .
      args:
        - API_LEVEL=34
        - CMD_LINE_VERSION=11076708_latest
        - IMG_TYPE=google_apis
    ports:
      - 5554:5554
      - 127.0.0.1:5555:5555
    environment:
      - DISABLE_ANIMATION=false
      - DISABLE_HIDDEN_POLICY=true
      - SKIP_AUTH=false
      #- ANDROID_ADB_SERVER_ADDRESS=host.docker.internal
      - MEMORY=16384
      - CORES=16
    privileged: true
    tty: true
    stdin_open: true
    volumes:
      - ./keys/adbkey:/root/.android/adbkey:ro
      - ./keys/adbkey.pub:/root/.android/adbkey.pub:ro
      - ./android_avd:/data
    extra_hosts:
      - "host.docker.internal:host-gateway"
    devices:
      - /dev/kvm:/dev/kvm

  android-emulator-cuda:
    build:
      context: .
      dockerfile: ./Dockerfile.gpu
      args:
        - API_LEVEL=34
        - CMD_LINE_VERSION=11076708_latest
        - IMG_TYPE=google_apis
    ports:
      - 5554:5554
      - 127.0.0.1:5555:5555
    environment:
      - DISABLE_ANIMATION=false
      - DISABLE_HIDDEN_POLICY=true
      - SKIP_AUTH=false
      #- ANDROID_ADB_SERVER_ADDRESS=host.docker.internal
      - MEMORY=16384
      - CORES=16
    privileged: true
    tty: true
    stdin_open: true
    volumes:
      - ./keys/adbkey:/root/.android/adbkey:ro
      - ./keys/adbkey.pub:/root/.android/adbkey.pub:ro
    extra_hosts:
      - "host.docker.internal:host-gateway"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]

  android-emulator-cuda-store:
    build:
      context: .
      dockerfile: ./Dockerfile.gpu
      args:
        - API_LEVEL=34
        - CMD_LINE_VERSION=11076708_latest
        - IMG_TYPE=google_apis_playstore
    ports:
      - 5554:5554
      - 127.0.0.1:5555:5555
    environment:
      - DISABLE_ANIMATION=false
      - DISABLE_HIDDEN_POLICY=true
      - SKIP_AUTH=false
      #- ANDROID_ADB_SERVER_ADDRESS=host.docker.internal
      - MEMORY=16384
      - CORES=16
    privileged: true
    tty: true
    stdin_open: true
    volumes:
      - ./keys/adbkey:/root/.android/adbkey:ro
      - ./keys/adbkey.pub:/root/.android/adbkey.pub:ro
    # volumes:
    #   - ./:/mnt
    extra_hosts:
      - "host.docker.internal:host-gateway"
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]