budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
9.57k stars 1.27k forks source link

On host reboot, container data lost #330

Closed lautriva closed 1 year ago

lautriva commented 2 years ago

🐛 Bug Report

Operating System: Linux Mint

Docker Image: budtmo/docker-android-x86-11.0

Docker Version:
20.10.12

Docker Command to start docker-android:

docker run --privileged -d -p 6080:6080 -p 4723:4723 -p 5554:5554 -p 5555:5555 \
-v /home/my_username/android_data/android:/root/.android \
-v /home/my_username/android_data/android_emulator:/root/android_emulator \
-e DATAPARTITION="4096m" \
-e DEVICE="Samsung Galaxy S10" --name android-container budtmo/docker-android-x86-11.0

Context

My phone broke, I use the emulator as my main smartphone before having a new one, so data keeping is critical

Expected Behavior

When I shutdown / reboot the host, container data should behave as if it was put in something like sleep mode

Actual Behavior

Container seems recreated on host reboot, previous data lost (unless I use workaround below) Emulator show boot animation

Workaround : I need to close the emulator in vnc to force AVD to take a snapshot, but its very boring to remember to do this before each reboot :/

Newbie to docker, so maybe I forgot to add a config option somewhere?

budtmo commented 1 year ago

Hi @dav64 ,

you need to use volume flag for that. I will close the issue as it is not a bug, but feel free to reopen the issue if needed.

lautriva commented 1 year ago

I'm sure I already used a volume but I don't remember because I've switched to Anbox since that time