All technological notes.
Docker container, it is executed as one or more regular Linux processes on the host system.Linux kernel, which is why containers are lightweight and fast to start.Linux namespaces
Linux namespaces (PID, NET, IPC, UTS, MNT, USER) to create isolated views of system resources.host can view and manage all container processes because the host sits in the root namespace.namespace mapping.Default user is root (inside the container)
Docker container run as the container’s root user.Running a container as a specific user
docker run --user 1001 ubuntu sleep 3600Best practice:
FROM ubuntu
RUN useradd -u 1000 appuser
USER appuser
Container root ≠ host root
Modifying capabilities
docker run --cap-add=MAC_ADMIN ubuntudocker run --cap-drop=KILL ubuntuPrivileged mode
docker run --privileged ubuntu