This is a tutorial on how to run Docker and Android to create a virtual machine which can be accessed online. Anyway, if you want to skip to the commands, here they are:
If you want to stay for a tutorial and an explanation, then read on.
Docker-Android recommends:
Except that I recommend that you use x86 for faster emulation, but for less compatibility or use ARM for slower emulation but more compatibility. That is the tradeoff.
Anyway, the basic x86 command is:
docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e DEVICE="Samsung Galaxy S6" -e VNC_PASSWORD="PASSWORD" --name android budtmo/docker-android-x86-8.1
VNC_PASSWORD makes the VNC connection to the machine password-protected so that nobody enters your VM.
budtmo/docker-android-x86-8.1
is the image name.
The image is the OS type that we will be using (Android). We already mentioned the differences between ARM and x86, but there is one crucial thing that you need to have on your system: VMX (debian) or Virtualization (Windows).
Virtualization or VMX is required to emulate the OS even for nested VMs. If it is not enabled, Android will not run.
Helpful Docker commands:
If you want to list your containers:
docker ps
If you want to stop a container:
docker stop CONTAINER ID
If you want to remove/delete a container:
docker rm CONTAINER ID
How to stop and remove a Docker container (Deleting Android):
First, type “docker ps”. This will list all of the containers. Then, copy the “CONTAINER ID”. This will be under the “CONTAINER ID” part. It will look something like this:

Then replace the bold part with the container ID and type it in the command line.
docker stop CONTAINER ID
docker rm CONTAINER ID
Some notes about the emulator:
It is sometimes buggy and does not support ARM very well so you will have minimal compatibility with apps when using x86.