This repository has been archived by the owner. It is now read-only.
Check if the process is running inside a Docker container
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.travis.yml
IsDocker.go
IsDocker_test.go
LICENSE
README.md

README.md

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