Docker 101 : Privileged containers



Privileged containers:

Privileged containers benefit from extended rights, that gives them access to devices, system directories, ... on the host.

From within a privileged container, we could modify networking, kernel parameters, or access restricted directories like the "/dev" directory for example.

Starting a privileged container:

We can start a privileged container using the below command:


We could run the below command for example to change the hostname:


Displaying the "privileged" containers:

For security reasons, we might want to check the containers running with "privilegesin our system.
To do that, we could use the below command:


  • .Id: is the container Id
  • .HostConfig.Privileged : is either set to "true" or "false".

Comments

Leave as a comment:

Archive