Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Zalenium not compatible with Docker 20.10.0 #1215

Open
danielvanmil opened this issue Jan 5, 2021 · 14 comments
Open

Zalenium not compatible with Docker 20.10.0 #1215

danielvanmil opened this issue Jan 5, 2021 · 14 comments

Comments

@danielvanmil
Copy link

danielvanmil commented Jan 5, 2021

🐛 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

@garmilw
Copy link

garmilw commented Jan 6, 2021

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

@danielvanmil
Copy link
Author

@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.

@pearj
Copy link
Collaborator

pearj commented Jan 8, 2021

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.

@iandeveseleer
Copy link

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)

@pearj
Copy link
Collaborator

pearj commented Jan 8, 2021

@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).

@iandeveseleer
Copy link

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

@iandeveseleer
Copy link

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

getLatestDownloadedImage.txt

@dbire
Copy link

dbire commented Jan 23, 2021

@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;
}

@danielvanmil
Copy link
Author

@iandeveseleer @dbire : docker images available somewhere?

@mkrakowitzer
Copy link

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

@mkrakowitzer
Copy link

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

It worked for our use case.

@komodin
Copy link

komodin commented May 4, 2021

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

@Oktaliem
Copy link

Oktaliem commented May 7, 2021

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

@pearj
Copy link
Collaborator

pearj commented May 7, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants