I'm following this youtube tutorial. I have everything working fine until minute 8:00 when the video author copy and paste this command:
docker run --name guacamole --link guacd:guacd --link guac-mysql:mysql \ -e MYSQL_DATABASE='guacamole' \ -e MYSQL_USER='guacamole' \ -e MYSQL_PASSWORD='sqlpassword' \ -d -p 8080:8080 guacamole/guacamole
After it I'm having the annoying:
docker: invalid reference format.
see 'docker run --help'
I have tried other answers like this and this
Please, if someone knows how to overcome this problem give me help.
Thx!
Got it! Spacing was the problem.
I used
docker run --name guacamole^
--link guacd:guacd^
--link guac-mysql:mysql^
-e MYSQL_DATABASE='guacamole'^
-e MYSQL_USER='guacamole'^
-e MYSQL_PASSWORD='sqlpassword'^
-d -p 8080:8080 guacamole/guacamole
where (^) is my line breaker.
Related
i want to create a NIFI container and pass it a template/flow to be loaded automatically when the container is being created (without human intervention).
couldn't find any volumes/environments that are related to it.
i tried using (suggested by chatGPT):
docker run -d -p 8443:8443 \
-v /path/to/templates:/templates \
-e TEMPLATE_FILE_PATH=/templates/template.xml \
--name nifi apache/nifi
and
docker run -d -p 8443:8443 \
-e NIFI_INIT_FLOW_FILE=/Users/l1/Desktop/kaleidoo/devops/files/git_aliases/flow.json \
-v /Users/l1/Desktop/kaleidoo/docker/test-envs/flow.json:/flow.json:ro \
--name nifi apache/nifi
non of them worked, and i couldn't find data about NIFI_INIT_FLOW_FILE and TEMPLATE_FILE_PATH in the documentation.
I have a problem with Docker. I wanted to run this command in cmd and also Windows-Powershell.
docker run -d --name pihole -e ServerIP=192.168.178.20 -e WEBPASSWORD=XXX -e TZ=Europe/Berlin -e DNS1=172.17.0.1 -e DNS2=1.1.1.1 -e DNS3=192.168.178.1 - p 80:80 -p 53:53/tcp -p 443:443 --restart=unless-stopped pihole/pihole:latest
I typed in the right password I just censored it here. Everytime I run this command I get the report:
invalid reference format
Can anyone of you help me, I donĀ“t know what to do.
I am trying to create a docker container for keycloak. But when I try the below command in docker quickstart terminal:
docker run -it -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin jboss/keycloak
I am getting the below error:
/opt/jboss/tools/docker-entrypoint.sh: line 165: DB_ADDR: unbound variable
Upon researching a bit, I came to know that I need to pass DB_ADDR in the command also. So I tried the below command now:
docker run -it -p 8080:8080 -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_ADDR=keycloak-db -e DB_VENDOR=h2 jboss/keycloak
But still I am getting the same error. I don't really know what I am doing wrong. Please if anyone can help me here. Thankyou all.
Update the script as below:
docker run \
-p 8080:8080 \
-e KEYCLOAK_USER=admin \
-e DB_VENDOR=h2 \
-e KEYCLOAK_PASSWORD=admin \
-it jboss/keycloak:latest
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.
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