{"id":18657833,"url":"https://github.com/lightsofapollo/dockerode-options","last_synced_at":"2025-04-11T18:31:45.381Z","repository":{"id":13443434,"uuid":"16132703","full_name":"lightsofapollo/dockerode-options","owner":"lightsofapollo","description":"Parse dockerode options from a string for DOCKER_HOST and DIND use cases","archived":false,"fork":false,"pushed_at":"2015-12-09T04:19:13.000Z","size":262,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T17:13:53.301Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lightsofapollo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-22T07:59:43.000Z","updated_at":"2019-07-08T18:22:04.000Z","dependencies_parsed_at":"2022-09-06T10:30:43.081Z","dependency_job_id":null,"html_url":"https://github.com/lightsofapollo/dockerode-options","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdockerode-options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdockerode-options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdockerode-options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lightsofapollo%2Fdockerode-options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lightsofapollo","download_url":"https://codeload.github.com/lightsofapollo/dockerode-options/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248458537,"owners_count":21107099,"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":[],"created_at":"2024-11-07T07:29:59.665Z","updated_at":"2025-04-11T18:31:44.214Z","avatar_url":"https://github.com/lightsofapollo.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"dockerode-options\n=================\n\nCan both parse string based options (like 127.0.0.1:4243) for dockerode and find sensible defaults for connecting to docker.\n\n\n## Usage\n\n\n### With a string\n\n```js\nvar dockerOpts = require('dockerode-options');\nvar Docker = require('dockerode');\n\n// DOCKER_HOST = '127.0.0.1:4243'\nvar options = dockerOpts(process.env.DOCKER_HOST);\n// =\u003e { host: 'http://127.0.0.1', port: 4243 }\n\n// these can now be used to start dockerode\nvar docker = new Docker(options);\n```\n\n\n### With no options\n\n```js\nvar dockerOpts = require('dockerode-options');\nvar options = dockerOpts();\n// =\u003e { socketPath: '/var/run/docker.sock' }\n```\n\n### With DOCKER_HOST environment variable set\n\n```js\nvar dockerOpts = require('dockerode-options');\n\nprocess.env.DOCKER_HOST = '127.0.0.1:60022';\n\nvar options = dockerOpts();\n// =\u003e { host: '127.0.0.1', port: 60022  };\n```\n\n### With DOCKER_CERT_PATH environment variable set\n\n```js\nvar dockerOpts = require('dockerode-options');\n\nprocess.env.DOCKER_CERT_PATH = '/home/certs';\n\nvar options = dockerOpts();\n// =\u003e { ca: \u003ccontents of /home/certs/ca.pem\u003e, cert: \u003ccontents of /home/certs/cert.pem\u003e, key: \u003ccontents of /home/certs/key.pem\u003e  };\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fdockerode-options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flightsofapollo%2Fdockerode-options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flightsofapollo%2Fdockerode-options/lists"}