{"id":15110258,"url":"https://github.com/pipedrive/containerized","last_synced_at":"2025-09-27T12:32:07.745Z","repository":{"id":57206372,"uuid":"43030653","full_name":"pipedrive/containerized","owner":"pipedrive","description":"Detect whether your Node.js process is containerized — e.g. whether it runs inside a Docker container.","archived":true,"fork":false,"pushed_at":"2022-12-02T11:20:14.000Z","size":413,"stargazers_count":28,"open_issues_count":0,"forks_count":8,"subscribers_count":134,"default_branch":"master","last_synced_at":"2024-12-16T23:23:49.920Z","etag":null,"topics":["containers","detect","detection","docker-container","node","nodejs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pipedrive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-23T22:27:23.000Z","updated_at":"2024-01-12T18:05:59.000Z","dependencies_parsed_at":"2023-01-22T22:15:48.447Z","dependency_job_id":null,"html_url":"https://github.com/pipedrive/containerized","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipedrive%2Fcontainerized","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipedrive%2Fcontainerized/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipedrive%2Fcontainerized/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pipedrive%2Fcontainerized/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pipedrive","download_url":"https://codeload.github.com/pipedrive/containerized/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234293137,"owners_count":18809445,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["containers","detect","detection","docker-container","node","nodejs"],"created_at":"2024-09-25T23:43:19.327Z","updated_at":"2025-09-27T12:32:02.010Z","avatar_url":"https://github.com/pipedrive.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/containerized.svg)](http://badge.fury.io/js/containerized) [![Build Status](https://travis-ci.org/pipedrive/containerized.svg?branch=master)](https://travis-ci.org/pipedrive/containerized) [![Coverage Status](https://coveralls.io/repos/github/pipedrive/containerized/badge.svg?branch=master)](https://coveralls.io/github/pipedrive/containerized?branch=master)\n\n# Containerized - DEPRECATED (You can use following package instead: https://github.com/sindresorhus/is-docker)\n\n * **Detect whether your Node.js process runs inside a Docker container or not**\n * Detection is based on existence of Docker-specific cgroups\n * Well tested (aiming at 100% line, function, statement and branch coverage)\n * Works with all Node.js versions \u003e= 0.10.x.\n * Tested in 0.10.x, 4.x, 5.x, 6.x.\n\n## Usage\n\n```\nnpm install containerized\n```\n\n### Node.js versions 0.12, 4.x, 5.x, 6.x, ...\n\n```javascript\nvar containerized = require('containerized');\n\nif (containerized()) {\n\tconsole.log('I am running inside a Docker container.');\n} else {\n\tconsole.log('I am NOT running inside a Docker container.');\n}\n```\n\n### In Node.js 0.10.x\n\nUp until node 0.10.x, containerized offers only async way of fetching whether the process is containerized in a container or not.\n\n```javascript\nvar containerized = require('containerized');\n\ncontainerized(function(err, result) {\n\tif (result === true) {\n\t\tconsole.log('I am running inside a Docker container.');\n\t} else {\n\t\tconsole.log('I am NOT running inside a Docker container.');\n\t}\n});\n```\n\nFor synchronous interface in Node \u003c= 0.10, wrap it in [deasync](https://www.npmjs.com/package/deasync) module:\n```javascript\nvar deasync = require('deasync');\nvar containerized = deasync(require('containerized'));\n\n// then you can:\nif (containerized()) {\n\tconsole.log('I am running inside a Docker container.');\n}\n```\n\n\n## Licence\n\nMIT.\n\n## Contribute?\n\nYou're welcome! Make sure you keep an eye on the tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpipedrive%2Fcontainerized","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpipedrive%2Fcontainerized","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpipedrive%2Fcontainerized/lists"}