Deadolus / android-studio-docker

Android Studio + flutter in Docker. Emulator works too - with or without Display, even over SSH if you forward the display
Apache License 2.0
138 stars 56 forks source link

mapping volume for AndroidStudioProjects #13

Closed szazs89 closed 11 months ago

szazs89 commented 1 year ago

I think that a folder for own projects should be mapped for the default /home/android/AndroidStudioProjects, too, in order to be accessible from the host... The image can be run via docker-compose, using

docker-compose.yaml ``` version: '3' ### check this folder-hierarchy: #mkdir -p astudio-data/Android #mkdir -p astudio-data/profile/{AndroidStudio2022.1.1.21,android,gradle,java} #mkdir astudio-projects services: astudio: image: deadolus/android-studio # container_name: a_studio # hostname: ... volumes: # - android-studio:/androidstudio-data ### what is it good for...? ### edit /home/AndroidStuff according to `pwd`: - /home/AndroidStuff/astudio-projects:/home/android/AndroidStudioProjects - /home/AndroidStuff/astudio-data:/studio-data - /dev/bus/usb:/dev/bus/usb - /tmp/.X11-unix:/tmp/.X11-unix environment: DISPLAY: privileged: true # group_add: ### this is NOT recognized, however, `groups` lists plugdev group # - plugdev # command: "deadolus/android-studio" # networks: # - hostnet #volumes: ### it is necessary only if uncommented above # android-studio: #networks: # hostnet: # external: true # name: host ```

Now, one can docker-compose up -d for the first time and docker-compose start after exits, etc.

Deadolus commented 1 year ago

Docker compose may comei in soon with https://github.com/Deadolus/android-studio-docker/pull/15