Skip to content

About

Gleam package to check if we're inside a container

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

is_container

Package Version Hex Docs

This package allows you to know whether you're running inside a container.

gleam add is_container
import gleam/io
import is_container.{is_docker, is_container}

pub fn main() -> Nil {
  case is_docker() {
    True -> io.println("Running inside Docker")
    False ->
      case is_container() {
        True -> io.println("Running inside a container (Podman/LXC)")
        False -> io.println("Not running inside a container")
      }
  }
}

Further documentation can be found at https://is-container.hexdocs.pm/.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.

About

Gleam package to check if we're inside a container

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages