{"id":39823143,"url":"https://github.com/laurelnaiad/mldock","last_synced_at":"2026-01-18T13:01:18.741Z","repository":{"id":57299057,"uuid":"100802427","full_name":"laurelnaiad/mldock","owner":"laurelnaiad","description":"NodeJS/TypeScript library and cli to download MarkLogic rpms and build docker images hosting MarkLogic Server 8+","archived":false,"fork":false,"pushed_at":"2020-06-01T22:15:29.000Z","size":1888,"stargazers_count":0,"open_issues_count":17,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-23T17:15:52.431Z","etag":null,"topics":["docker","marklogic","nodejs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/laurelnaiad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-19T15:13:02.000Z","updated_at":"2019-12-13T19:10:54.000Z","dependencies_parsed_at":"2022-08-26T17:00:55.633Z","dependency_job_id":null,"html_url":"https://github.com/laurelnaiad/mldock","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/laurelnaiad/mldock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurelnaiad%2Fmldock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurelnaiad%2Fmldock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurelnaiad%2Fmldock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurelnaiad%2Fmldock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laurelnaiad","download_url":"https://codeload.github.com/laurelnaiad/mldock/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laurelnaiad%2Fmldock/sbom","scorecard":{"id":579999,"data":{"date":"2025-08-11","repo":{"name":"github.com/laurelnaiad/mldock","commit":"24b5e259738575f959df7f7191830a8807f043f9"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.6,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: src/dockerFiles/centos6.Dockerfile:3","Warn: containerImage not pinned by hash: src/dockerFiles/centos7.Dockerfile:3","Warn: containerImage not pinned by hash: src/dockerFiles/centos8.Dockerfile:3","Warn: containerImage not pinned by hash: src/dockerFiles/rpmDownload.Dockerfile:2","Warn: containerImage not pinned by hash: src/dockerFiles/rpmDownload.Dockerfile:17","Warn: containerImage not pinned by hash: src/dockerFiles/rpmLocal.Dockerfile:2","Info:   0 out of   6 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"44 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-pp7h-53gx-mx7r","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-mh2h-6j8q-x246","Warn: Project is vulnerable to: GHSA-5q88-cjfq-g2mh","Warn: Project is vulnerable to: GHSA-xp63-6vf5-xf3v","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4q6p-r6v2-jvc5","Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97","Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv","Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8","Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65","Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh","Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44","Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-px4h-xg32-q955","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j","Warn: Project is vulnerable to: GHSA-g6ww-v8xp-vmwg","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-652h-xwhf-q4h6","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-7p7h-4mm5-852v","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh","Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T18:56:50.149Z","repository_id":57299057,"created_at":"2025-08-20T18:56:50.149Z","updated_at":"2025-08-20T18:56:50.149Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28536686,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T10:13:46.436Z","status":"ssl_error","status_checked_at":"2026-01-18T10:13:11.045Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["docker","marklogic","nodejs"],"created_at":"2026-01-18T13:01:03.222Z","updated_at":"2026-01-18T13:01:18.724Z","avatar_url":"https://github.com/laurelnaiad.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mldock\n[![npm](https://img.shields.io/npm/v/mldock.svg)](https://www.npmjs.com/package/mldock)\n[![Travis](https://img.shields.io/travis/laurelnaiad/mldock/master.svg)](https://travis-ci.org/laurelnaiad/mldock)\n[![Codecov](https://img.shields.io/codecov/c/github/laurelnaiad/mldock/master.svg)](https://codecov.io/gh/laurelnaiad/mldock)\n[![Greenkeeper badge](https://badges.greenkeeper.io/laurelnaiad/mldock.svg)](https://greenkeeper.io/)\n---\n\u003e NodeJS/TypeScript library/CLI -- downloads MarkLogic rpms and builds Docker images hosting MarkLogic Server 8+\n\n## Description\n\n_mldock_ was conceived as a means of building Docker images to host MarkLogic Server in a repeatable manner, so that other systems don't suffer headaches developing/testing such a heavyweight operation.\n\nmldock:\n\n* downloads MarkLogic .rpm files from MarkLogic using the developer credentials you bring;\n* builds Docker images that run MarkLogic Server;\n* helps run image as containers.\n\nIt does very little beyond that, but to allow for substitution of fancier baselines _underneath_ the MarkLogic image.\n\n## Installation\n\nPrerequisites:\n* NodeJS 10.15.3+\n* Docker Engine 17.06+\n* a free [MarkLogic Developer Account](https://developer.marklogic.com/people/signup)\n\n```bash\nnpm install -g mldock # (local installs are fine, too)\n```\n\n`mldock -h` gives help for the command-line interface, and see typings for the barest of library api assistance.\n\n## Usage\n\n### The `mldock` cli:\n\nDownload/build image in one step:\n```bash\nmldock build -r my-ml-proj -e $MLDEV_USER -p $MLDEV_PW 8.0-6.4\n# =\u003e ...(a rolling log ensues and lasts a while)\n#\n# my-ml-proj-marklogic:8.0.6.4\n```\n\nOr seperately:\n```bash\nmldock download -e $MLDEV_USER -p $MLDEV_PW -d ./downloaded 8.0-6.4\n# =\u003e ...(a rolling log ensues and lasts a while)\n# downloading version 8.0-6.4 to ./downloaded  ...done\n#\n# \u003cPWD\u003e/downloaded/MarkLogic-RHEL7-8.0-6.4.x86_64.rpm\n\nmldock build -r my-ml-proj -f downloaded/MarkLogic-RHEL7-8.0-6.4.x86_64.rpm 8.0-6.4\n# =\u003e ...(a rolling log ensues and lasts a while)\n# preparing centos7-compat...done.\n# building centos7-compat...done.\n# preparing MarkLogic 8.0-6.4...done.\n# building MarkLogic 8.0-6.4....done.\n#\n# my-ml-proj-marklogic:8.0.6.4\n```\n\nOr do it all:\n```bash\nmldock run --n my-container -e $MLDEV_USER -p $MLDEV_PW 8.0-6.4\n```\n\n### The `MlDock` class:\n\n```typescript\nimport {\n  MlDock,\n} from 'mldock'\n\nconst creds = {\n  email: process.env.MLDEV_USER,\n  password: process.env.MLDEV_PW\n}\n\n/**\n * This example downloads the requisite .rpm file from developer.marklogic.com using the\n * given credentials.\n */\nconst mldock = new MlDock({ repo: 'my-ml-proj' })\nmldock.buildVersion({\n  version: '9.0-2',\n  rpmSource: creds\n}).then((imageName) =\u003e {\n  console.log(`built ${imageName}`)\n  // =\u003e built my-ml-proj-marklogic:9.0.2\n})\n```\n\nThe workhorse of mldock is MlDockClient, which itself extends [apocas/dockerode](https://github.com/apocas/dockerode). Docker-related options for MlDock are specified as Dockerode options in the 2nd (optional) MlDock constructor parameter.\n\n```typescript\nimport {\n  MlDock,\n} from 'mldock'\n\n/* instantiate MlDock to operate on `ml-ml-proj` on `my-docker-host` host. */\nconst mldock = new MlDock(\n  { repo: 'my-ml-proj' },\n  { host: 'my-docker-host', port: 2375 }\n)\n\n/* the `.client` property exposes the MlDockClient/Dockerode instance. */\nmldock.client.createContainer({\n  // ...\n})\nmldock.client.getEvents({\n  // ...\n})\n```\n\nIn order to follow progress of long operations, pass a \"progress follower\".\n\nThe unit tests use this one, which writes everything to the console (the cli uses a rolling logs implementation which is also exported):\n\n```typescript\nimport {\n  defaultFollower,\n  MlDock,\n} from 'mldock'\n\nmldock.buildVersion({\n  version: '8.0-6.4',\n  rpmSource: creds,\n  progressFollower: defaultFollower\n}).then((imageName) =\u003e {\n  //...\n})\n```\n\nThere are a few functions on the library to start containers.\nOf particular note may be the `startHostHealthy` function.\n\nThe unit tests use this to ensure images are functional.\n\n```typescript\nconst version = new MlVersion('8.0-6.4')\nconst oneSecondInNano = 1000 * 1000000\n\nmldock.buildVersion(version, creds, defaultFollower)\n.then((imageName) =\u003e mldock.createHostContainer({\n  version,\n  healthCheck: {\n    Test: [\n      'CMD-SHELL',\n      `curl --silent --fail http://localhost:8001/admin/v1/timestamp || exit 1`\n    ],\n    Interval: oneSecondInNano,\n    Timeout: oneSecondInNano,\n    Retries: 12,\n    StartPeriod: oneSecondInNano\n  }\n})\n.then((container) =\u003e mldock.startHostHealthy(container.id!, 10, defaultFollower))\n/* the server is up and running now. */\n.then((container) =\u003e mldock.hostInspect(container.id!))\n.then((containerRuntime) =\u003e {\n  console.log(JSON.stringify(containerRuntime.ports))\n  // =\u003e print something like the following, where the high port numbers are the\n  //      externally mapped ports for the standard marklogic ports\n  // { '8000': 39472, '8001': 38497, '8002': 38434 }\n})\n```\n\nThe `runHost` function is quite similar to `buildVersion`, except:\n\n* the container needs a name\n* the concept of \"overwriting\" the image is out -- instead of the image or a\ncontainer by the given name exists, it's used\n\n## Images\n\nSeperation of images by repository-prefix allows for different base operating systems or other platform customizations to co-exist in the same docker host.\n\nIn addition to pulling the base operating system image (centos6 or centos7 by default), the following are created:\n\n* \\`${repo-prefix}-os\\`: this is the base operating system + MarkLogic dependencies\n* \\`${repo-prefix}-marklogic\\`: MarkLogic Server on top of the the \\`-os\\` image\n\nNaturally, all the MarkLogic images share their associated OS image base For later 8.0.x releases of MarkLogic which can run on 6 or 7, Centos7 is used as the base.\n\nOne may wish to build production images from RHEL rather than CentOS, and/or to tweak the heck out of the operating system generally or do something strange. In such cases, the default base image may be overridden in order to supply some other image which is compatible with the expected CentOS version, e.g.\n\n```bash\nmldock build -f MarkLogic.rpm --base my-customized-rhel-image 9.0-2\n```\n\nNote that the image specified as `base` replaces  \\`centos:centos6\\` or \\`centos:centos7\\` in the image stack -- a customized \\`${repo-prefix}-os\\` image will still be built on top of that which is given as the `base` in order to maintain an otherwise consistent image stack.\n\nIn addition to MarkLogic Server, the following is installed in the `MarkLogic` image:\n\n* `/usr/local/bin/mlrun.sh`: runner/signal trap for the containerized MarkLogic Server instance\n\nThe /var/opt/MarkLogic directory is marked as a volume and left in uninitialized state.\n\n## Contributing\n\nContributing is very welcome.\n\n## License\n\nMIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurelnaiad%2Fmldock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaurelnaiad%2Fmldock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaurelnaiad%2Fmldock/lists"}