-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Infrastructure as Code Cookbook
By :

By default, containers execute everything as the root
user. Granted that containers are running in an isolated environment, but still, a publicly facing daemon is running as root on a system, and a security breach may give an attacker access to this particular container, and maybe root shell access, giving access at least to the container's Docker overlay network. Would we like to see this issue combined with a 0-day local kernel security breach that would give the attacker access to the Docker host? Probably not. Then, maybe we should keep some of the good old practices and start by executing our daemon as a user other than root.
To step through this recipe, you will need the following:
Let's take a simple HTTP server that answers on the port 8000
of the container. Executed through a container, it would look like this, as seen earlier...
Change the font size
Change margin width
Change background colour