Check if the process is running inside a Docker container
package main
import (
"fmt"
. "github.com/dlion/IsDocker"
)
func main() {
if IsDocker() {
fmt.Println("Info: Running inside a docker container")
}
}
go test
Domenico Luciani
MIT
Check if the process is running inside a Docker container
package main
import (
"fmt"
. "github.com/dlion/IsDocker"
)
func main() {
if IsDocker() {
fmt.Println("Info: Running inside a docker container")
}
}
go test
Domenico Luciani
MIT