How to check if running inside Docker?

To check if you are inside a docker container, run the command

cat /proc/1/cgroup | grep --color  docker

If you get some result with docker in it, you are inside a docker container.

Example

Advertisement

identify docker container

See Docker

Add a comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Advertisement