Discussion
· Mar 24, 2020

USER namespace in Docker

For standalone installations I always recommended to use custom namespaces and not the USER namespace.

However, what about Docker?

In many Dockerfiles I see the creation of additional namespace, but why, if only one namespace is required?

What do you think?

Discussion (2)0
Log in or sign up to continue

Possible reasons

  • Another recommendation is to separate code and data. So, I need at least two databases, code which is always in a container, and data mounted outside.
  • Just to be consistent, some project, and namespace with the same name as the project. With only own configuration. Without anything predefined. In most cases, namespace and any related configuration, supposed to be configured for the particular project. And keeping USER as is and do not touch except for some temporary staff, like import Installer manifest and setup it.
  • One of the reasons for USER still exists, that it is kind of entrypoint, and keep it as is, will keep from anything unexpected.

Just my thoughts

This is a very good question, Ed!

Yes, when you launch a vanilla IRIS CE on docker you have USER namespace and database already. 

But what is the web app? is it REST? do you need the web app at all? 

The infrastructure-as-a-code approach, when the namespace, database, web app, security, BI or Interoperability options, etc is being setup via docker/workflow deployment has the following advantages.

1. Clear understanding, what infrastructure is needed for your app to run on the dev/deployment lifecycle

2. You have the control for the infrastructure - you do not expect USER namespace present or have this or that, you simply set up all your app needs.

3. All the changes to infrastructure are in the repo and you track it.