QT-DevOps / DevOpsIssues

This Repo will be used to demonstrate the Skills & Questions in DevOps
Apache License 2.0
27 stars 131 forks source link

I am getting error when I pass argument #977

Open tmaheedhar2 opened 3 years ago

tmaheedhar2 commented 3 years ago

I have CMD in my Dockerfile I created container with "test:2.0" I want to pass the argument "cmd" but I am getting error. please help me with correct syntax image Output:- $ docker container run -P test:2.0 cmd ls docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"cmd\": executable file not found in $PATH": unknown. ERRO[0000] error waiting for container: context canceled

$ docker container run -P test:2.0:cmd ls docker: invalid reference format. See 'docker run --help'.

santhoshd402 commented 3 years ago

Hi

try to run "docker container run -it -P test:2.0 ls" or "docker container run test:2.0 ls"