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.
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 viadocker-compose
, usingdocker-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 anddocker-compose start
after exits, etc.