sudores in lxd container

Jasmin shahrzad
Jasmin shahrzad used Ask the Experts™
i have a ubuntu lxd container (on ubuntu 18.04).
i add a domain group in visudo. and run lxc set security.priviliged true on my lxd docker.
i try to update ubuntu 16 as domain user in sudores group:
return error : sudo apt update
sudo: unable to resolve host “my-host”
sudo: no tty present and no askpass program specified.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Fractional CTO
Distinguished Expert 2018
1) LXD != Docker.

Maybe you mean you're running LXD on your machine, then Docker containers inside your LXD containers.

Clarify if this is correct.

2) You can't set lxc set security.privileged true on a Docker container, so I'm guessing #1 is incorrect.

Setting the security.privileged means inside your container, simply means you can access any file systems on your machine (which are manually associated with the container) base on UID=0 starting UIDs.

My guess is this isn't what you're really trying to do.

Suggestion: Open another EE question describing exactly what you wish to accomplish + likely many people can assist.

3) unable to resolve host “my-host”

Simple fix. Add an /etc/hosts entry for... my-host

Open in new window

4) no tty present and no askpass program specified

To answer this will require answering the above questions, then providing far more context... like your entire command sequence, which means your exact ssh command. Sometimes adding -t to your ssh command fixes this.

Tip: Try accessing your container like this, to escape the missing TTY problem...

lxc exec cname bash

Open in new window

Where cname is your container name.
Id assume tbe following

You used the term "docker " while thinking container "

You need to sudo using the domiain account incuding @whatever or set a trust reationship between myhost and whatever acts as the dc

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial