/IsDocker

Check if the process is running inside a Docker container

Primary LanguageGoMIT LicenseMIT

IsDocker Build Status

Check if the process is running inside a Docker container

How to use it

package main

import (
	"fmt"
	. "github.com/dlion/IsDocker"
)

func main() {
	if IsDocker() {
		fmt.Println("Info: Running inside a docker container")
	}
}

Test

go test

Author

Domenico Luciani

https://domenicoluciani.com

License

MIT