android-studio-docker icon indicating copy to clipboard operation
android-studio-docker copied to clipboard

Issues with compose and run

Open StackedSystems opened this issue 1 year ago • 1 comments

When running "docker compose run android_emulator" the exec fails to run docker entrypoint

$user :~/Android_Container/android-studio-docker$ sudo docker compose run android_emulator exec /usr/local/bin/docker_entrypoint.sh: no such file or directory

StackedSystems avatar May 31 '24 01:05 StackedSystems

Convert all CRLF to LF. Then if you have display errors, use this docker compose file. Run from WSL Ubuntu console!!! Not PowerShell

if you have windows11 with WSLg then it will run!


services:
  android_emulator:
    image: deadolus/android-studio
    build: .
    stdin_open: true
    tty: true
    volumes:
      - ./studio-data/profile/AndroidStudio2022.3.1.20:/studio-data/profile/AndroidStudio2022.3.1.20
      - ./studio-data/Android:/studio-data/Android
      - ./studio-data/profile/.android:/studio-data/profile/.android
      - ./studio-data/profile/.java:/studio-data/profile/.java
      - ./studio-data/profile/.gradle:/studio-data/profile/.gradle
       # Mount the proper location for X11 server if you are running this in WSL
      - /mnt/wslg/.X11-unix:/tmp/.X11-unix
       # Mount the proper locationm for x11 server if you are running this in native linux
#      - /tmp/.X11-unix:/tmp/.X11-unix .
      - android_studio:/androidstudio-data
      - ./provisioning/docker_entrypoint.sh:/usr/local/bin/docker_entrypoint.sh
      - /tmp/.X11-unix:/tmp/.X11-unix
      - /mnt/wslg:/mnt/wslg
    environment:
      #- DISPLAY=:0 # Set DISPLAY environment variable
      - DISPLAY=${DISPLAY}
      - WAYLAND_DISPLAY=${WAYLAND_DISPLAY}
      - XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
      #- DISPLAY=host.docker.internal:0
    privileged: true
    group_add:
      - plugdev
    network_mode: "host"
#    devices:
      # Uncomment the previous and next line if you want to pass through USB to the container.
      # - /dev/bus/usb:/dev/bus/usb
    entrypoint: /usr/local/bin/docker_entrypoint.sh
volumes:
  android_studio:

arduinka55055 avatar Mar 21 '25 12:03 arduinka55055