Probleme with docker "docker run --rm -t -i --name"

Hello every body ,

I hope you are well . I’m new to docker , i need your help plz.
I built a docker “hello” by using this command “docker build -t hello .”

but i’m blocked in this step : docker run --rm -t -i --name dnsmasq_test dnsmasq bash. The message error is :
docker:command not found , i don’t know whereis the problem.

Also i want to know the container id how can i extract it.

Best Regards.

try run docker images.
you need added the images id or name.
this is command for know the container id : docker ps

Hi avnersib

Thank u for your reply and for your help .

I have another error when i excute this command “docker cp poc.y hello_test:poc.y” the message error is :bash:sudo:command not found

Best regards.

The error message is likely to mean that the image you are running does not contain the “sudo” command. Your options are to run an image that does contain the command. Another option is to build an image from your existing base image (dnsmasq), add/install the sudo command and any dependencies required, tag and push the image to a registry, and run the updated image. There may be other options available to you.

Best of luck!