No control over the browser version being used on containers for our test? - zalenium

Browser comes with selenium image. For different browser version, need to pull different docker image.
Suppose I want to run my tests on Chrome Browser's 73.0.3683.86 version, then Can we consider an option of specifying the browser version while starting zalenium ? i.e. docker run --rm -ti --name zalenium -p 4444:4444 -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/videos:/home/seluser/videos --privileged dosel/zalenium start --timeZone "Asia/Kolkata" --screenWidth 1280 --screenHeight 720 --chromeVersion "73.0.3683.86"
It should pull the version runtime in image.

That feature is not implemented. Zalenium is open source, consider sending a pull request to add that feature.

Related

Kernel-slim UBI docker image not working with springBootUtility

Team, Is it possible to use springBootUtility with OpenLiberty kernel-slim UBI images (e.g. - kernel-slim-java8-openj9-ubi) ?
https://openliberty.io/docs/21.0.0.7/reference/command/springbootUtility-thin.html
Because, it's giving an error as
Step 3/11 : RUN springBootUtility thin --sourceAppPath=/staging/fat-order-0.0.1-SNAPSHOT.jar --targetThinAppPath=/staging/thin-order-0.0.1-SNAPSHOT.jar --targetLibCachePath=/staging/lib.index.cache
---> Running in 3023c669c4d7
/bin/sh: springBootUtility: command not found
The springBootUtility is only working with OpenLiberty full UBI images
The kernel-slim image does not appear to have that command at all. Compare kernel-slim:
bash-5.1$ docker run --rm -it openliberty/open-liberty:kernel-slim-java8-openj9-ubi ls /opt/ol/wlp/bin
auditUtility binaryLog.bat productInfo securityUtility.bat serverSchemaGen
auditUtility.bat featureUtility productInfo.bat server serverSchemaGen.bat
binaryLog featureUtility.bat securityUtility server.bat tools
To full:
bash-5.1$ docker run --rm -it openliberty/open-liberty:full-java8-openj9-ubi ls /opt/ol/wlp/bin
auditUtility binaryLog.bat featureUtility pluginUtility securityUtility.bat springBootUtility
auditUtility.bat client featureUtility.bat pluginUtility.bat server springBootUtility.bat
batchManager client.bat jaxb productInfo server.bat tools
batchManager.bat ddlGen jaxrs productInfo.bat serverSchemaGen
binaryLog ddlGen.bat jaxws securityUtility serverSchemaGen.bat
There appears to be a hole in the documentation, since nothing indicates you need to do this, but you need to install the springBoot feature into Open Liberty before the command will be added. Copy your server.xml with spring boot specified into the image, then run features.sh:
COPY --chown=1001:0 server.xml /config/
RUN features.sh
After that, springBootUtility will be placed in the /opt/ol/wlp/bin dir and should be on the path as well for further Dockerfile directives to use.

can't reach .net core web app using docker (windows)

This is driving me crazy:
I created a new .Net Core Web App from VS2019, adding support for docker (linux containers).
Everything works fine: if I start the debugger from VS the image is built, the container is started and the web app is available at http://localhost:32772/weatherforecast.
Then I clean it all up, and try to build and run manually:
docker build -t webapp2 --file webapplication2/Dockerfile .
docker run --name webapp2 -p 5000:5000 -t webapp2
(or even docker run --name webapp2 -p 5000:5000 -e "ASPNETCORE_ENVIRONMENT=Development" -t webapp2)
Build runs successfully, and (apparently) run command works fine too:
But...surprise...This way I cannot reach the app anymore (at http://localhost:5000/weatherforecast)!
Tried almost anything, use internal ip address from inspect, changing ports and run commands, adding -e "ASPNETCORE_URLS=https://+:443;http://+:80", nothing seems to work.
So the question is: what kind of magic we have behind the VS debug command?
I tried to see what's there but I don't see anything useful:
docker run -dt -v "C:\Users\carlo\vsdbg\vs2017u5:/remote_debugger:rw" -v "C:\Progetti\prove\docker\API\WebApplication2:/app" -v "C:\Progetti\prove\docker\API:/src/" -v "C:\Users\carlo\.nuget\packages\:/root/.nuget/fallbackpackages2" -v "C:\Program Files\dotnet\sdk\NuGetFallbackFolder:/root/.nuget/fallbackpackages" -e "DOTNET_USE_POLLING_FILE_WATCHER=1" -e "ASPNETCORE_LOGGING__CONSOLE__DISABLECOLORS=true" -e "ASPNETCORE_ENVIRONMENT=Development" -e "NUGET_PACKAGES=/root/.nuget/fallbackpackages2" -e "NUGET_FALLBACK_PACKAGES=/root/.nuget/fallbackpackages;/root/.nuget/fallbackpackages2" -P --name WebApplication2 --entrypoint tail webapplication2:dev -f /dev/null
Thanks!
Passing the port to docker run doesn't somehow override the port he application is running on. All you're saying is that you want port 5000 on the container exposed as port 5000 on the network. However, you app is running on 80, so that buys you nothing. You'd need -p 80:5000.
The ASPNETCORE_URLS environment variable is just way to configure the URLs of your app, which in a container is going to bind to https://+:443;http://+:80 by default. Setting the environment variable to the same thing again does nothing. You could do something like http://+:5000, which would then change the internal port to 5000 instead of 80, and then your original docker run command would have worked, because there's something actually running on port 5000.

Error "Docker: invalid publish opts format " runing Graphviz docker container on Mac Os

I'm completely new to docker and am using it for the first time.
I have installed Docker Desktop for Mac OS and run the 'Hello-world' container successfully. I am now trying to run this 'omerio/graphviz-server' from https://hub.docker.com/r/omerio/graphviz-server (which is what I really want Docker for) and although the 'docker pull omerio/graphviz-server' command completes successfully:
devops$ docker pull omerio/graphviz-server
Using default tag: latest
latest: Pulling from omerio/graphviz-server
863735b9fd15: Pull complete
4fbaa2f403df: Pull complete
44be94a95984: Pull complete
a3ed95caeb02: Pull complete
ae092b5d3a08: Pull complete
d0edb8269c6a: Pull complete
Digest: sha256:02cd3e2355526a927e951a0e24d63231a79b192d4716e82999ff80e0893c4adc
Status: Downloaded newer image for omerio/graphviz-server:latest
the command to start the container (given on https://hub.docker.com/r/omerio/graphviz-server): 'docker run -d -p : omerio/graphviz-server' gives me the error message:
devops$ docker run -d -p : omerio/graphviz-server
docker: invalid publish opts format (should be name=value but got ':').
See 'docker run --help'.
Searching for this error message returns no information at all. I see that the container in question was last updated over 3 years ago - could it be an old format that Docker no longer supports?
-p option of docker run command binds ports between host and container (see docs), and its usage is most of the time the following :
docker run <other options> \
-p <port on the host>:<port in the container> \
<my_image> <args>
As for your example : it seems that running the image needs an argument (the port in the container). Let's choose 8080 for example (that means port 8080 will be used by the application inside the container).
If you want to access it directly on your host (via localhost), you should bind 8080 port (in the container, the port we chose previously) to any available port on your host (let's say 8081), like this :
docker run \
-p 8081:8080 \
omerio/graphviz-server 8080
You should now be able to access the application (port 8080 of the application running in the container) from your host via localhost:8081.

RabbitMQ console returned 431

I start rabbitmq on docker with command:
docker run -d --hostname my-rabbit --name rabbit-fox -p 5672:5672 -p 8090:15672 rabbitmq:3-management
it runs fine and i can log into console, but later on Chrome browser i get this:
and can not use then console in the browser.
Clearing browser's cache & memory did the work in my case.
After facing the same issue these steps performed:
I tried to re-run the docker, even I got to the point I re-installed the RabbitMQ server image without any result.
It simply was solved when I cleared the browser's Cache & Memory

Application has different appearance when running through docker

I'm successfully running a GUI application through docker, but when doing so, the appearance changes.
Run docker
docker run -i -t --net=host -e DISPLAY -v /tmp/.X11-unix/:/tmp/.X11-unix --env="QT_X11_NO_MITSHM=1" myimage
E.g. when running Firefox, the standard appearance changes to classic (ugly) when running it through docker.
Here are the original and the change appearances:
In my own created app, the formatting also changes because of that.
Any suggestions how to prevent this change when running app through docker?

Resources