docker-android icon indicating copy to clipboard operation
docker-android copied to clipboard

Option not to use docker health check

Open vikramvi opened this issue 8 years ago • 6 comments
trafficstars

CONTAINER ID        IMAGE                                 COMMAND                  CREATED             STATUS                   PORTS                                                                NAMES
1a8f82552161        butomo1989/docker-android-arm-5.0.1   "/bin/sh -c '/usr/..."   6 minutes ago       Up 6 minutes (healthy)   0.0.0.0:5554-5555->5554-5555/tcp, 4723/tcp, 0.0.0.0:6080->6080/tcp   android-container_1

adb connect 192.168.2.48:5555

adb devices
List of devices attached
192.168.2.48:5555	offline

I can see this particular emulator through VNC and interact with it as well.

vikramvi avatar Aug 14 '17 13:08 vikramvi

Hi,

we encountered the same problem and our current solution is to start the container without port forwarding for port 5554 and 5555.

cwiejack avatar Aug 15 '17 12:08 cwiejack

Hi there is bug inside docker container. we did it inside container (shell or via noVNC)

adb connect:5555 adb devices

and it shows offline status even after adb kill-server As results it is not working after port forwarding.

@butomo1989 Could you please take a look the root case?

Thank you

glazeus avatar Aug 18 '17 11:08 glazeus

@butomo1989 does it make sense to have this health check in this image?

I mean, this health check is just executing a a given script or pinging and endpoint to report some status. In my opinion, this type of feature provided by docker, makes more sense in images that are used in production (like an API, website, etc...), in this test environment perhaps it does not make sense because checking the health check status is using resources and therefore slowing down a bit the docker container.

What do you think?

diemol avatar Aug 30 '17 14:08 diemol

@diemol without the health check, if this is used in some sort of CI setup or more or less automated setup when something spools up container and starts executing tests towards it, there is no way to know when the emulator is ready to receive requests and tests will mostly fail. One could implement some check within his own build scripts but it is far less convenient. I doubt simple adb commands takes too much resources :)

andrcuns avatar Aug 30 '17 15:08 andrcuns

That is a good point @glazeus I suggested to remove it since we did something similar in elgalu/docker-selenium since it was exhausting the grid, but this should not be the case here.

I only imagine that the script that reports the status to the health check has to be improved then :)

diemol avatar Aug 31 '17 14:08 diemol

I can make it optional by passing the parameter on the fly to support both cases.

budtmo avatar Sep 26 '17 12:09 budtmo