You can verify if you're in a container by the existence of /.dockerenv in the root directory.
/.dockerenv
Last updated 3 years ago