OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"-it\": executable file not found in $PATH":unknown

The docker command line is order sensitive. The order of args goes:

docker ${args_to_docker} run ${args_to_run} image_ref ${cmd_in_container}

Everything after ubuntu in your command goes to the command trying to be run. In your case -it. What you want instead is to pass -it to "run" so that you get interactive input with a tty terminal associated.

docker run -it ubuntu /bin/bash

Tags:

Docker