-
Notifications
You must be signed in to change notification settings - Fork 1
Updating to Arctic Fox (2020.3.1) Patch 4 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
The persistency of the Android Studio configuration is improved by mounting /home/developer/.config Source: Use volumes | Docker Documentation https://docs.docker.com/storage/volumes/#choose-the--v-or---mount-flag
Sources: Understanding linux DISPLAY variable - Stack Overflow https://stackoverflow.com/questions/20947681/understanding-linux-display-variable https://stackoverflow.com/a/20947791 https://stackoverflow.com/questions/20947681/understanding-linux-display-variable/20947791#20947791 X Windows broken on fast ring WSL2 (?) · Issue #5106 · microsoft/WSL · GitHub microsoft/WSL#5106 microsoft/WSL#5106 (comment) microsoft/WSL#5106 (comment) WSL2 GUI X-Server Using VcXsrv - Shogan.tech https://www.shogan.co.uk/how-tos/wsl2-gui-x-server-using-vcxsrv/ Xming X Server for Windows - Trouble? http://www.straightrunning.com/xmingnotes/trouble.php
The source URL now points to a different version of Android Studio. The URL from the Android Studio download archives website is slightly different, the line below would also have been valid: `ARG studio_source=https://redirector.gvt1.com/edgedl/android/studio/ide-zips/2020.3.1.26/android-studio-2020.3.1.26-linux.tar.gz` Sources: Android Studio download archives | Android Developers https://developer.android.com/studio/archive
To comply with compatibility requirements for running Android Studio Arctic Fox (2020.3.1) Patch 4, Java needs to be upgraded in the Docker image Error Message (Resolved): java - Upgrading from openJDK 8 to openJDK 11 - Stack Overflow Sources: Android Studio Error "Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8" - Stack Overflow https://stackoverflow.com/questions/66980512/android-studio-error-android-gradle-plugin-requires-java-11-to-run-you-are-cur java - Upgrading from openJDK 8 to openJDK 11 - Stack Overflow https://stackoverflow.com/questions/63699194/upgrading-from-openjdk-8-to-openjdk-11 https://stackoverflow.com/a/63699326 https://stackoverflow.com/questions/63699194/upgrading-from-openjdk-8-to-openjdk-11/63699326#63699326
| -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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you explain the reason behind these changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes are reflective of how the Android Studio binaries are located in my local installation, e.g. -v ~/.AndroidStudio.sdk:/home/developer/Android/Sdk, so you may overlook or rename accordingly. I found some of the mounts to be unnecessary, like -v ~/.AndroidStudio:/home/developer/.AndroidStudio and -v ~/.AndroidStudio.android:/home/developer/.android. The most important volume mount is -v ~/.AndroidStudio.config:/home/developer/.config, I noticed that it makes the configuration after first startup more persistent.
| -v ~/Android/:/home/developer/Android/Sdk \ | ||
| -v "$PWD:/home/developer/Project" \ | ||
| --name androidstudio-$(head -c 4 /dev/urandom | xxd -p)-$(date +'%Y%m%d-%H%M%S') \ | ||
| chubaoraka/docker-androidstudio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you mean to point this at your DockerHub account?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because I uploaded the Arctic Fox image on my account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That makes sense. I'd perhaps propose archiving this repo with some pointers to your repo if you'd be interested in maintaining this image? I no longer do Android dev, so it's unlikely I'll bump this often...
What do you think? If you're happy with that, perhaps replace this PR with one that changes the Readme only to clearly point to your repo, and we could get that in (and then I could archive this repo)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good 👍
|
Thanks a lot for looking into this! I haven't used AndroidStudio in a long while, which is why this hasn't been updated. I left some comments for clarification please, and I expect you tested this build locally? |
| -v ~/Android/:/home/developer/Android/Sdk \ | ||
| -v "$PWD:/home/developer/Project" \ | ||
| --name androidstudio-$(head -c 4 /dev/urandom | xxd -p)-$(date +'%Y%m%d-%H%M%S') \ | ||
| chubaoraka/docker-androidstudio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because I uploaded the Arctic Fox image on my account.
| -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 | ||
| -v ~/.AndroidStudio.config:/home/developer/.config \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line makes the initial configuration of the IDE persistent across restarts.
-v ~/.AndroidStudio.config:/home/developer/.config \
| -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 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the changes are reflective of how the Android Studio binaries are located in my local installation, e.g. -v ~/.AndroidStudio.sdk:/home/developer/Android/Sdk, so you may overlook or rename accordingly. I found some of the mounts to be unnecessary, like -v ~/.AndroidStudio:/home/developer/.AndroidStudio and -v ~/.AndroidStudio.android:/home/developer/.android. The most important volume mount is -v ~/.AndroidStudio.config:/home/developer/.config, I noticed that it makes the configuration after first startup more persistent.
| rycus86/androidstudio:3.4 | ||
| -v ~/.AndroidStudio.config:/home/developer/.config \ | ||
| -v ~/.gradle:/home/developer/.gradle \ | ||
| -v ~/Android/:/home/developer/Android/Sdk \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use your own local directory names
| -v ~/Android/:/home/developer/Android/Sdk \ | |
| -v ~/.AndroidStudio.sdk:/home/developer/Android/Sdk \ |
The persistence of the Android Studio configuration is improved running the new command. However, there seems to be a bug in the new version as I cannot type
ENTERon the Android Studio terminal. I'm not sure whether this is a bug with the Android Studio version or something else.I included the previous version in the Docker builds and tagged on GitHub as appropriate.