Find the user who started a docker container

Solution 1:

This worked for me:

docker inspect $(docker ps -aq) --format '{{.Config.User}} {{.Name}}'

My setup:

Host: Ubuntu 16.04

Docker version: 17.06.2-ce, build cec0b72