ev3dev / brickstrap

Tool for bootstrapping Debian and creating bootable image files for embedded systems
MIT License
36 stars 26 forks source link

Can't Sudo inside Docker Containers #69

Closed keenanjohnson closed 4 years ago

keenanjohnson commented 5 years ago

I ran the setup to get the docker containers configured, but I can't seem to run sudo.

I get the following

no tty present and no askpass program specified docker

dlech commented 5 years ago

You need to run docker with the --tty option.

keenanjohnson commented 5 years ago

Hmmm running the command below didn't seem to resolve that. I still get the same no tty error.

Keenans-MBP:~ keenan$ docker run --tty --rm -it ev3dev/ev3dev-buster-ev3-generic su -l robot

dlech commented 5 years ago

Try this to get a command prompt inside of the docker container:

 docker run --rm -it ev3dev/ev3dev-buster-ev3-generic bash

but be aware that when you exit, all changes are lost because of the --rm option.

dlech commented 5 years ago

also, --tty is the same as t in -it