I have gone through this article http://www.testautomationguru.com/selenium-webdriver-disposable-selenium-grid-infrastructure-setup-using-zalenium Integrating with Cloud Testing Platforms:
I have already added sauce username and access key in Environment variables. It docker, Zalenium works without Saucelabs but with saucelabs gives error: docker.exe: invalid reference format.
Without Saucelabs - works fine:
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
With Saucelabs - gives formatting error:
docker run --rm -ti --name zalenium -p 4444:4444 -p 5555:5555 \
-e SAUCE_USERNAME
-e SAUCE_ACCESS_KEY \
-v /tmp/videos:/home/seluser/videos \
-v /var/run/docker.sock:/var/run/docker.sock \ dosel/zalenium start --sauceLabsEnabled true
I am using Docker Toolbox on Windows 7
Already took reference of:
docker: invalid reference format in shell script
docker : invalid reference format
Docker command returns "invalid reference format"
My mistake was - I was using back slash \. After removing it from command it worked. After removing it becomes
docker run --rm -ti --name zalenium -p 4444:4444 -p 5555:5555
-e SAUCE_USERNAME
-e SAUCE_ACCESS_KEY
-v /tmp/videos:/home/seluser/videos
-v /var/run/docker.sock:/var/run/docker.sock dosel/zalenium start --sauceLabsEnabled true
Take care of unnecessary space also.
Related
Working on docker desktop on windows.
docker command from the PowerShell:
docker run -p 80:8080 -d --name demo1 -e SWAGGER_JSON=/custom/swagger.json -v a-data-volume:/custom swaggerapi/swagger-ui
docker command from the Git Bash:
docker run -p 80:8080 -d --name demo2 -e SWAGGER_JSON=/custom/swagger.json -v a-data-volume:/custom swaggerapi/swagger-ui
Issue: The environment variable SWAGGER_JSON is not the same on both containers even though it is set the same way in the command. While demo1 has the correct one, demo2 doesn't.
I am running Jenkins inside a docker container.
I use the following command to start the container -
docker run -p 8080:8080 -p 50000:50000 -v "${PWD}:/var/jenkins_home" -v /var/run/docker.sock:/var/run/docker.sock aemdesign/jenkins
Notice -v /var/run/docker.sock:/var/run/docker.sock - I have done this so that I can access the docker daemon from within Jenkins as per this article.
I cd into the jenkins container using docker exec -it <mycontainer> bash
I then run docker ps -a but I still get docker command not found error.
I did some more research online and found out about the docker plugin for Jenkins, and configured it to connect to the docker daemon. I get the following error
Am I missing something? How do I solve this issue? Please note that I am doing this locally on a MAC machine.
-v /var/run/docker.sock:/var/run/docker.sock, this just means your container has ability to access docker daemon on the host, not mean your container will have the docker client.
You could use -v $(which docker):/usr/bin/docker to add docker client to your container, then you will find the command.
docker run -u root -p 8080:8080 -p 50000:50000 -v $(which docker):/usr/bin/docker -v "${PWD}:/var/jenkins_home" -v /var/run/docker.sock:/var/run/docker.sock aemdesign/jenkins
Another way if you want reserve jenkins user.
docker run -u jenkins:$(cut -d: -f3 < <(getent group docker)) -p 8080:8080 -p 50000:50000 -v $(which docker):/usr/bin/docker -v "${PWD}:/var/jenkins_home" -v /var/run/docker.sock:/var/run/docker.sock aemdesign/jenkins
I ran the docker run command to run the jenkins image.
But this is the command that was executed in the past, but now an error occurs.
command
docker run -u root —rm -p 8080:8080 —name jenkins \ -v Users/human/jenkins:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \ jenkins
error
docker: invalid reference format.
See 'docker run --help'.
My environment is Mac OS X. What's wrong with me?
It could be the path "Users/human/jenkins" is invalid. If you are using $PWD following the example on Jenkins site, be very careful about possible space character in the "current" path. That would mess up the command and throw out that error message you posted.
It seems like you have a parsing issue for the command above, I have changed this — to --.. this should work:
docker run -u root --rm -p 8080:8080 --name jenkins -v Users/human/jenkins:/var/jenkins_home -v /var/run/docker.sock:/var/run/docker.sock jenkins
Or like this:
docker run -u root --rm -p 8080:8080 --name jenkins \
-v Users/human/jenkins:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkins
Really new to docker and docker infrastructure. So from the official Zalenium github page I followed all the steps successfully until I get to the point:
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
and after executing it I'm getting:
> docker: invalid reference format.
> See 'docker run --help'
While doing research here on SOF, I've landed here and here, but nothing seems to work in my situation. I've tried to replace --rm -ti to the end of the expression: didn't work
docker run --name zalenium -p 4444:4444 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /tmp/videos:/home/seluser/videos \
--privileged --rm -ti dosel/zalenium start
I'm sure there is a specific format that I have to follow, but can't find a clue to it (missing comma, wrong backslash, unnecessary whitespace). Appreciate for your help.
I just noticed that the command example we have does not work for Windows, I just changed the docs to show how to run a multiline command in Windows.
Here is the way:
docker run --rm -ti --name zalenium -p 4444:4444 ^
-v /var/run/docker.sock:/var/run/docker.sock ^
-v /c/Users/your_user_name/temp/videos:/home/seluser/videos ^
--privileged dosel/zalenium start
I have updated my windows OS 10 from Home to Pro. I have installed windows docker toolbox on my machine.
I try to run the apache kafka in docker using following command :
docker run --rm -it \
-p 2181:2181 -p 3030:3030 -p 8081:8081 \
-p 8082:8082 -p 8083:8083 -p 9092:9092 \
-e ADV_HOST=192.168.99.100 \
landoop/fast_data_dev
But when I run the above program, it gives me following error :
Unable to find image 'landoop/fast_data_dev:latest' locally
F:...\Docker Toolbox\docker.exe: Error response from daemon: repository landoop/fast_data_dev not found: does not exist or no pull access.
See:'F:...\Docker Toolbox\docker.exe run --help.
Please let me know what is the problem over here.
The image name appears to be incorrect. I think you are looking for https://hub.docker.com/r/landoop/fast-data-dev/. The correct command should be (notice the - instead of _):
docker run --rm -it -p 2181:2181 -p 3030:3030 -p 8081:8081 -p 8082:8082 -p 8083:8083 -p 9092:9092 -e ADV_HOST=192.168.99.100 landoop/fast-data-dev