VOOZH about

URL: https://thenewstack.io/quest-build-unprivileged-container/

⇱ The Quest to Build an Unprivileged Container - The New Stack


TNS
SUBSCRIBE
Join our community of software engineering leaders and aspirational developers. Always stay in-the-know by getting the most important news and exclusive content delivered fresh to your inbox to learn more about at-scale software development.
REQUIRED
It seems that you've previously unsubscribed from our newsletter in the past. Click the button below to open the re-subscribe form in a new tab. When you're done, simply close that tab and continue with this form to complete your subscription.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.
Welcome and thank you for joining The New Stack community!
Please answer a few simple questions to help us deliver the news and resources you are interested in.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Great to meet you!
Tell us a bit about your job so we can cover the topics you find most relevant.
REQUIRED
REQUIRED
REQUIRED
REQUIRED
REQUIRED
Welcome!

We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.

What’s next?

Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.

Follow TNS on your favorite social media networks.

Become a TNS follower on LinkedIn.

Check out the latest featured and trending stories while you wait for your first TNS newsletter.

PREV
1 of 2
NEXT
VOXPOP
As a JavaScript developer, what non-React tools do you use most often?
Angular
0%
Astro
0%
Svelte
0%
Vue.js
0%
Other
0%
I only use React
0%
I don't use JavaScript
0%
Thanks for your opinion! Subscribe below to get the final results, published exclusively in our TNS Update newsletter:
NEW! Try Stackie AI
From clobbered drafts to real-time sync
Apr 14th 2026 10:00am, by David Moore
TypeScript 6.0 RC arrives as a bridge to a faster future
Mar 14th 2026 9:00am, by Darryl K. Taft
Mastra empowers web devs to build AI agents in TypeScript
Jan 28th 2026 11:00am, by Loraine Lawson
2016-07-20 12:28:40
The Quest to Build an Unprivileged Container
Containers / Open Source / Security

The Quest to Build an Unprivileged Container

Jul 20th, 2016 12:28pm by Joab Jackson
👁 Featued image for: The Quest to Build an Unprivileged Container

One aspect that has long bothered security professionals about Docker containers is that they run as root, even if the processes they run themselves are unprivileged.

Now Docker maintainer Jessie Frazelle, formerly of Docker and now with Google, is looking to remedy this issue, along with some fellow Docker users from the community, including many from the Gnome open-source desktop project.

To be exact, the root status the container enjoys is far more limited than full-on root privileges of the machine owner. Through the Linux kerenel, Docker drops more than half of the root capabilities by default. Additionally, Docker blocks dangerous system calls and confines containers using a number of other means.

But to run every Docker run command, end users have to run the sudo command — the command that grants administrative privileges to users.  To eliminate all this extra typing, administrators might feel the temptation to add their users to a system Docker user group, which gives users root access on the system, thereby making systems vulnerable to privilege escalation attacks.

Frazelle and company are working on something called unprivileged containers, which removes the sudo requirement altogether, replacing it with a finer set of controls. She explained the work at the recent QCON New York, developers conference.

In addition to allaying security worries, unprivileged containers would be better suited to supporting multi-tenancy environments, in that many shops restrict their developers from shipping their apps to run in root, as a basic security measure.

Even with the default settings, containers are still more secure than running apps natively on a server, Frazelle said.  Frazelle herself runs all her desktop apps in containers (an idea of interest to the Gnome folks).

Docker had good reasons for running containers as root. “There are a lot of operations you need to be root user for, to get a typically networked application up and running,” said Docker security engineer David Lawrence, during a short interview at Dockercon 2016 last month.

Chromium Inspiration

The idea for unprivileged containers is inspired by Google open source Chromium browser, Frazelle explained in a technical session.  The Chromium browser restricts each browser tab to its sandboxed process, using namespaces and seccomp from the Linux kernel.

Guess what? Docker containers also use Linux seccomp and namespaces. Seccomp restricts the calls a process can make and namespaces limit what resources a user (i.e. container) can see. Recent advances in the Linux Kernel (version 3.8) grants each container the ability to create its own universal set of namespaces.

The difficult part of the project is dealing with control groups, known as cgroups. Cgroups can be used to limit the resources, such as CPU time, system memory and network bandwidth that a user can consume. Tighter control of cgroups would, for instance, prevent container fork bombs from cratering a server.

To date, unprivileged users creating cgroup controls is tricky at best, Frazelle pointed out, likening the job to a “huge tire fire,” in a recent blog post.

Nonetheless, Frazelle worked up a proof-of-concept unprivileged container, called binctrl, sans cgroup controls. And SUSE software developer Aleksa Sarai has submitted patches to the Linux kernel team to make cgroups more amiable to supporting unprivileged containers. Work is also being done to add support for unprivileged containers in the runc universal container runtime, upon which Docker containers can now be run.

Least Privileged Microservices

Frazelle is not alone in attacking this issue. Docker’s security team is working on an implementation of a concept called “least privileged microservices,” Docker’s Lawrence said. “The idea is that your microservice should run the fewest permissions as possible,” he said.

Ideally, containers should work a bit like mobile apps, Lawrence said, in that they come pre-configured with security settings and when they are downloaded they let the administrator know exactly what permissions they require.

Also, BubbleWrap, from people building the Project Atomic next-generation container-based operating system, is another tool that strives for something similar. It creates a new namespace, allowing the user to “run an application in a sandbox, where it has restricted access to parts of the operating system or user data such as the home directory,” according to the project’s GitHub page.

Docker is a sponsor of The New Stack.

Feature image: A “Box Truck Guardian,” painted by @sinned_nyc.

TRENDING STORIES
Joab Jackson is a senior editor for The New Stack, covering cloud native computing and system operations. He has reported on IT infrastructure and development for over 30 years, including stints at IDG and Government Computer News. Before that, he...
Read more from Joab Jackson
SHARE THIS STORY
TRENDING STORIES
TNS owner Insight Partners is an investor in: Docker.
SHARE THIS STORY
TRENDING STORIES
TNS DAILY NEWSLETTER Receive a free roundup of the most recent TNS articles in your inbox each day.
The New Stack does not sell your information or share it with unaffiliated third parties. By continuing, you agree to our Terms of Use and Privacy Policy.