zalenium icon indicating copy to clipboard operation
zalenium copied to clipboard

Zalenium not compatible with Docker 20.10.0

Open danielvanmil opened this issue 3 years ago • 14 comments

🐛 Bug Report

Zalenium not compatible with Docker 20.10.0. Most likely the cause is the Spotify Docker Client 8.15.0 that is not compatible with Docker 20.10. 0 as the filter feature is deprecated/changed, see changelog https://docs.docker.com/engine/release-notes/#20100 (Remove deprecated “filter” parameter for API v1.41 and up moby/moby#40491)

DockerContainerClient.getLatestDownloadedImage uses the filter function, but now returns all the images because the filter is not applied anymore.

To Reproduce

  • Start Zalenium on Docker 20.10.0

Expected behavior

  • Zalenium creates containers with the default or specified image (elgalu/selenium)

Actual behavior

  • Zalenium creates containers with the last installed? image which could not be the elgalu/selenium image

Test script reproducing this issue (when applicable)

  • Start Zalenium on Docker 20.10.0

Environment

OS: Windows 10, Docker 20.10.0 Zalenium Image Version(s): dosel/zalenium:3.141.59z Docker version: 20.10.0

danielvanmil avatar Jan 05 '21 14:01 danielvanmil

I am having a similar issue with Chrome not starting under Zalenium on MacOS 10.15.7 with Docker 20.10.0 installed. This worked prior to my doing the Docker update. Update: found a work around. I had to remove all my docker images, and let them all download again via docker-compose. Doing that let the Chrome image run under Zalenium with Docker 20.10.0

garmilw avatar Jan 06 '21 14:01 garmilw

@garmilw: Could be the same issue. problem is that when you install a new docker image Zalenium will use the latest installed image. So when using Docker with multiple images besides Zalenium this will be tricky and not stable.

Possible workaround/solutions:

  • Fork Zalenium and fix the bug
  • Move to Selenium Grid as this is recommended (but still in beta). Problem is we're using some Zalenium features that the grid doesn't support yet I think.
  • Try to run Zalenium in a DockerInDocker with an older Docker version as a temporary workaround
  • Run Zalenium in a dedicated lower version Docker environment so it keeps working and wait for a stable Selenium Grid release.

danielvanmil avatar Jan 07 '21 11:01 danielvanmil

You could run Zalenium inside kubernetes instead. Then the docker version won’t matter anymore as long as it’s compatible with whatever Kubernetes flavour you choose.

pearj avatar Jan 08 '21 12:01 pearj

You could run Zalenium inside kubernetes instead. Then the docker version won’t matter anymore as long as it’s compatible with whatever Kubernetes flavour you choose.

It's not really true. Zalenium depend on fabric8 kubernetes-client 4.1.0 which isn't compatible with K8S versions above 1.9 in theory (but above 1.16 in practice)

iandeveseleer avatar Jan 08 '21 14:01 iandeveseleer

@iandeveseleer Ahh yes the fabric8 client is a bit older. I have an installation running on Kubernetes 1.11. What happens after 1.16 which makes it not work? Zalenium doesn’t use anything particularly complex in Kubernetes, creating and deleting pods as well as executing commands in pods (from memory).

pearj avatar Jan 08 '21 22:01 pearj

@pearj Some deleted apiVersion are used in communication with Kubernetes, making node containers creation impossible.

iandeveseleer avatar Jan 14 '21 10:01 iandeveseleer

This modification on getLatestDownloadedImage method worked for me, to make Zalenium working with Docker 20.10.X.

getLatestDownloadedImage.txt

iandeveseleer avatar Jan 14 '21 10:01 iandeveseleer

@danielvanmil, I have patched src/main/java/de/zalando/ep/zalenium/container/DockerContainerClient.java to its simplest expression and it is fine for my use case. At least I can use zalenium with docker 3.x

public String getLatestDownloadedImage(String imageName) {
        return imageName;
}

dbire avatar Jan 23 '21 13:01 dbire

@iandeveseleer @dbire : docker images available somewhere?

danielvanmil avatar Feb 02 '21 10:02 danielvanmil

Would be great if one of you could publish an image somewhere. @iandeveseleer @dbire

mkrakowitzer avatar Feb 19 '21 13:02 mkrakowitzer

I have created an image with @iandeveseleer patch here: https://hub.docker.com/r/clsplatform/zalanium-patched

It worked for our use case.

mkrakowitzer avatar Feb 19 '21 15:02 mkrakowitzer

Hi, is it in the plans to fix this? It would be great can update to Docker 20, but we're stuck on 19 because of this bug. Thanks

komodin avatar May 04 '21 17:05 komodin

Yeah got that similar problem on Docker 20.10.2

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 53735d86e1d6 sonarqube:latest "bin/run.sh bin/sona…" 8 minutes ago Up 8 minutes 9000/tcp, 40000/tcp, 50000/tcp zaleniumth_FlpUPk

Zalenium took another image e.g. sonarqube instead of elgalu/selenium.

agree with @komodin Downgrade to Docker 19.03.8 and it's fine CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 8f5d99789d81 elgalu/selenium:3.141.59-p57 "entry.sh" About a minute ago Up About a minute 40000/tcp, 50000/tcp zaleniumth_5JbdQR

Oktaliem avatar May 07 '21 01:05 Oktaliem

Hi, is it in the plans to fix this? It would be great can update to Docker 20, but we're stuck on 19 because of this bug. Thanks

This project is no longer receiving updates. Feel free to use the workarounds mentioned above.

pearj avatar May 07 '21 09:05 pearj