{"id":18165655,"url":"https://github.com/kenec/dockrr","last_synced_at":"2025-06-12T12:34:03.956Z","repository":{"id":57142352,"uuid":"198094132","full_name":"Kenec/dockrr","owner":"Kenec","description":"An npm package for generating docker file, building, running and stopping running docker image of a Node.js application.","archived":false,"fork":false,"pushed_at":"2020-07-19T18:00:17.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-14T12:36:47.155Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/Kenec.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":"2019-07-21T18:57:34.000Z","updated_at":"2021-02-02T16:03:44.000Z","dependencies_parsed_at":"2022-09-05T18:41:19.047Z","dependency_job_id":null,"html_url":"https://github.com/Kenec/dockrr","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/Kenec%2Fdockrr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenec%2Fdockrr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenec%2Fdockrr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kenec%2Fdockrr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kenec","download_url":"https://codeload.github.com/Kenec/dockrr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601446,"owners_count":20964866,"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-02T12:08:16.536Z","updated_at":"2025-04-07T06:19:46.252Z","avatar_url":"https://github.com/Kenec.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockrr\n\n[![Build Status](https://travis-ci.org/Kenec/dockrr.svg?branch=master)](https://travis-ci.org/Kenec/dockrr)\n[![Coverage Status](https://coveralls.io/repos/github/Kenec/dockrr/badge.svg?branch=master)](https://coveralls.io/github/Kenec/dockrr?branch=master)\n\u003cbr\u003e\n**dockrr** is an an NPM package for auto generating Dockerfile, building docker image, running and stopping the docker container in Node.js. \n\n## Installation\n```\nnpm install dockrr --save-dev\n```\n\n## Configuration\n1. Setup the dockrr config file in your application ***package.json*** file\n```\n...\n\n\"dockrr\":{\n    \"cmd\": \"node index.js\",\n    \"expose\": 3000,\n    \"env\": [\n        { \"name\": \"name 1\" },\n        { \"metadata\": \"meta data 1\" },\n        { \"path\": \"Log Path 1\" }\n      ],\n    \"label\": [\n        { \"version\": \"1.0\" }, \n        { \"description\": \"A sample label\" },\n        { \"maintainer\": \"nnamani.kenechukwu@gmail.com\" }\n      ],\n    \"workdir\": \"/app\"\n  },\n```\n\n2. Add script to generate Dockerfile, build docker image, start and stop docker container in your ***scripts*** section of ***package.json*** file\n```\n....\n\n\"scripts\": {\n    \"start\": \"node index.js\",\n    \"dockrr-generate\": \"node ./node_modules/dockrr generate\",\n    \"dockrr-build\": \"node ./node_modules/dockrr build\",\n    \"dockrr-run\": \"node ./node_modules/dockrr run\",\n    \"dockrr-stop\": \"node ./node_modules/dockrr stop\"\n  },\n```\n\nAlternatively, we can use *dockrr* aliases such as\n```\n....\n\n\"scripts\": {\n    \"start\": \"node index.js\",\n    \"dockrr-generate\": \"node ./node_modules/dockrr g\",\n    \"dockrr-build\": \"node ./node_modules/dockrr b\",\n    \"dockrr-run\": \"node ./node_modules/dockrr r\",\n    \"dockrr-stop\": \"node ./node_modules/dockrr s\"\n  },\n```\n\n### Usage\n1. To generate Dockerfile for your application, run\n```\nnpm run dockrr-generate\n```\n\n2. To build docker image using the generated Dockerfile, run\n```\nnpm run dockrr-build\n```\n\n3. To run the docker container using the built image, run\n```\nnpm run dockrr-run\n```\n***Visit the application on your web browser on `http://localhost:\u003cport number\u003e/`***\n\n4. To stop the docker container, run\n```\nnpm run dockrr-stop\n```\n\n### dockrr config commands\n| Commands      | Description                                                       | Type                | Required  |\n| ------------- |:------------------------------------------------------------------|:--------------------| :---------|\n| **cmd**       | Command that docker will use to start your application            | String              | **True**  |\n| **expose**    | The application port which you want the container to run on       | Integer             | **True**  |\n| **env**       | The environment variables for docker                              | Array of Objects    | **False** |\n| **label**     | Key value pair of metadata to the image                           | Array of Objects    | **False** |\n| **workdir**   | The working directory in the Dockerfile                           | String              | **False** |\n\n\n### ISSUES\nTo report an issue or give feedback, Click link\n[Issues and Feedback](https://github.com/Kenec/dockrr/issues)\n\n### Contributing\nWe are more than happy to have you contribute to this project.\n\n### License\n[MIT](https://github.com/Kenec/dockrr/blob/master/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenec%2Fdockrr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkenec%2Fdockrr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkenec%2Fdockrr/lists"}