############ Docker notes ############ /var/lib/docker on macOS ======================== In macOS, docker commands (e.g., `docker volume inspect`) return references to `/var/lib/docker`, however this directory does not exist on the macOS host. A way to check on it (ref. [dockernotes-01]_): .. code-block:: fish > docker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh References ---------- .. [dockernotes-01] `Where is /var/lib/docker on Mac/OS X (Stack Overflow) `_ (Retrieved 2021-08-04) Determine the container using a docker volume ============================================= Ref. [dockernotes-02]_ : .. code-block:: fish docker ps -a --filter volume=VOLUME_NAME_OR_MOUNT_POINT .. code-block:: fish docker volume ls --filter name=container_name References ---------- .. [dockernotes-02] `How to determine what containers use the docker volume? (Stack Overflow) `_ (retrieved 2021-08-04) Find the owner of a process running on a container without ps ============================================================= Ref. [dockernotes-03]_ : - Simplest way seem to be using `docker top` command: .. code-block:: fish > docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES dfc7f2476fc9 contnotebook_docs "/start-docs" 23 hours ago Up 6 hours 0.0.0.0:7000->7000/tcp, :::7000->7000/tcp contnotebook_docs > docker top dfc7 UID PID PPID C STIME TTY TIME CMD root 18872 18844 0 Aug04 ? 00:00:00 /bin/bash /start-docs root 18982 18872 0 Aug04 ? 00:00:00 make livehtml root 18983 18982 1 Aug04 ? 00:03:15 /usr/local/bin/python /usr/local/bin/sphinx-autobuild -b html --host 0.0.0.0 --port 7000 -c . . _build/html - Another way: find the information relative to a process in `/proc/PROCESS_ID/status` References ---------- .. [dockernotes-03] `how to find owner of a process without ps (Stack Overflow) `_ (retrieved 2021-08-04)