Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for containers (docker, etc...)? #140

Open
1 task done
zAlweNy26 opened this issue Oct 3, 2024 · 3 comments · May be fixed by #141
Open
1 task done

Support for containers (docker, etc...)? #140

zAlweNy26 opened this issue Oct 3, 2024 · 3 comments · May be fixed by #141
Labels
enhancement New feature or request

Comments

@zAlweNy26
Copy link

zAlweNy26 commented Oct 3, 2024

Describe the feature

I think it would be nice to also add an isDocker and/or isContainer methods, so everything you need is in one module and you don't have to install the is-docker or is-inside-container packages separately :)

Additional information

  • Would you be willing to help implement this feature?
@zAlweNy26 zAlweNy26 added the enhancement New feature or request label Oct 3, 2024
@zAlweNy26 zAlweNy26 changed the title Support for docker? Support for containers (docker, etc...)? Oct 3, 2024
@pi0
Copy link
Member

pi0 commented Oct 3, 2024

For detecting docker from the main subpath, we need to use filesystem API which reduces platform agnostic nature of std-env.

We might port it as a subpath export though like { isDocker } from "std-env/docker") (https://github.com/unjs/listhen/blob/main/src/lib/docker.ts)

@zAlweNy26
Copy link
Author

It seems a good way to me

@pi0
Copy link
Member

pi0 commented Oct 3, 2024

PR welcome 👍🏼

@zAlweNy26 zAlweNy26 linked a pull request Oct 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants