Check if the current terminal is Docker
Original link: https://blog.frytea.com/archives/775/ To determine if the currently running terminal is inside a Docker container, you can examine container-specific files and environment variables. Here’s one way, judging by looking at the /proc/1/cgroup file: cat /proc/1/cgroup Observe the content of the output. If you see something related to Docker such as docker or containerd, you are […]
Check if the current terminal is Docker Read More »