{"id":18441628,"url":"https://github.com/stefanwalther/docker-verb","last_synced_at":"2025-04-07T22:32:27.658Z","repository":{"id":21986732,"uuid":"90423290","full_name":"stefanwalther/docker-verb","owner":"stefanwalther","description":"Run verb by using a docker-container.","archived":false,"fork":false,"pushed_at":"2023-10-01T14:39:01.000Z","size":69,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T17:54:31.369Z","etag":null,"topics":["docker","docker-image","readme","verb","verbose"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stefanwalther.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.yml","contributing":"docs/contributing.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-05T23:05:59.000Z","updated_at":"2021-07-03T12:33:33.000Z","dependencies_parsed_at":"2022-09-17T14:02:04.218Z","dependency_job_id":null,"html_url":"https://github.com/stefanwalther/docker-verb","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-verb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-verb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-verb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stefanwalther%2Fdocker-verb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stefanwalther","download_url":"https://codeload.github.com/stefanwalther/docker-verb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247741533,"owners_count":20988424,"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":["docker","docker-image","readme","verb","verbose"],"created_at":"2024-11-06T06:38:53.234Z","updated_at":"2025-04-07T22:32:25.356Z","avatar_url":"https://github.com/stefanwalther.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-verb\n\n\u003e Run verb on Docker.\n\n## Table of Contents\n\n\u003cdetails\u003e\n\n- [Motivation](#motivation)\n- [Run](#run)\n- [Configuration](#configuration)\n- [Recipes](#recipes)\n  * [Watching doc changes](#watching-doc-changes)\n  * [Run only if necessary](#run-only-if-necessary)\n- [Installation](#installation)\n  * [Prerequisites](#prerequisites)\n- [Known Issues](#known-issues)\n- [Changelog](#changelog)\n- [About](#about)\n  * [Author](#author)\n  * [Contributing](#contributing)\n  * [License](#license)\n\n_(TOC generated by [verb](https://github.com/verbose/verb) using [markdown-toc](https://github.com/jonschlinkert/markdown-toc))_\n\n\u003c/details\u003e\n\n## Motivation\n\n[verb](https://github.com/verbose/verb) is a great solution to document projects, create README files, enter [README driven development](https://www.google.de/search?q=readme+driven+development).\nThis project helps to make it even easier to use by \"dockerizing\" verb.\n\n___(By using this solution you do not need to install verb as a global node.js package anymore)___\n\n## Run\n\n```sh\n$ docker run --rm -v ${PWD}:/opt/verb stefanwalther/verb\n```\n\nWhat does actually happen here?\n\n- A docker container using the given solution will be spinned up\n- `-v` mounts the current directory to the docker container\n- Finally, after the container has been built, `verb` will be executed (and the container being destroyed)\n\n## Configuration\n\nI recommend to add a task into your `package.json` file, which triggers the creation of your README.md file\n\n```json\n{\n  \"name\": \"Your Repo\",\n  \"scripts\": {\n    \"docs\": \"docker run --rm -v ${PWD}:/opt/verb stefanwalther/verb\"\n  }\n}\n```\n\nThen, whenever you want to generate your docs, run:\n\n```sh\n$ npm run docs\n```\n\n## Recipes\n\nSome recipes I have come up over time, using verb nearly on a daily basis.\n\n### Watching doc changes\n\nIf you want to auto-build your docs whenever you make changes, there is a pretty neat way to achieve that:\n\n1) Install [nodemon](https://nodemon.io/)\n\n```bash\n$ npm install -g nodemon\n```\n\n2) Add a watch script to your package.json\n```bash\n\"scripts\": {\n    \"docs\": \"docker run --rm -v ${PWD}:/opt/verb stefanwalther/verb\",\n    \"docs:watch\": \"nodemon --config ./nodemon.json --exec 'yarn' docs\"\n  },\n```\n\n3) Add a nodemon.json config file to your root dir:\n\n```json\n{\n  \"ext\": \"md\",\n  \"verbose\": false,\n  \"ignore\": [\n    \"README.md\"\n  ],\n  \"watch\": [\n    \".verb.md\",\n    \"docs\"\n  ]\n}\n```\n\n4) Run docs:watch\n\n```bash\n$ npm run docs:watch\n```\n\nIf you are not making any changes to either .verb or any document in ./docs, then your README.md will be re-generated.\n\n### Run only if necessary\n\nIf you commit often, you don't want to miss when to run verb, but on the other hand I don't want to run it if not necessary.\nThis is how I manged to achieve this goal:\n\n1) First of all I use [husky](https://github.com/typicode/husky) to be able to add git hooks (precommit, prepublish, etc.)\n2) I combine a `prepush` hook with a custom script which just figures out if running verb is necessary (in this case only if there are changes in the `.verb` file or if anything has changed in the `./docs/` directory).\n\n_package.json:_\n```sh\n  \"scripts\": {\n    \"docs-if-necessary\": \"./scripts/docs-if-necessary.sh\",\n    \"docs\": \"docker run --rm -v ${PWD}:/opt/verb stefanwalther/verb\",\n    \"prepublish\": \"npm run docs-if-necessary\"\n  }\n```\n\n_./scripts/docs-if-necessary.sh:_\n```sh\n#!/usr/bin/env bash\n\nif (git status | grep -E \"docs/|.verb.md\" -q);\nthen\n  npm run docs;\n  \n  # Stop the push\n  # Note: Instead of exiting you could even go one step further and \n  # automatically git commit the newly created README.md. I have\n  # experimented with that, but didn't really like it.\n  exit 10; \n  \nfi\n```\n\n## Installation\n\n### Prerequisites\n\n- [Docker for Mac](https://docs.docker.com/docker-for-mac/) / [Docker for Windows](https://docs.docker.com/docker-for-windows/)\n\n## Known Issues\n\n... none known so far ...\n\n## Changelog\n\nSee [CHANGELOG file](CHANGELOG.yml)\n\n## About\n\n### Author\n\n**Stefan Walther**\n\n* [github/stefanwalther](https://github.com/stefanwalther)\n* [twitter/waltherstefan](http://twitter.com/waltherstefan)\n* [LinkedIn](https://www.linkedin.com/in/stefanwalther/)\n\n### Contributing\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/stefanwalther/docker-verb/issues). The process for contributing is outlined below:\n\n1. Create a fork of the project\n2. Work on whatever bug or feature you wish\n3. Create a pull request (PR)\n\nI cannot guarantee that I will merge all PRs but I will evaluate them all.\n\n### License\nCopyright © 2021, Stefan Walther.\n \nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwalther%2Fdocker-verb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstefanwalther%2Fdocker-verb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstefanwalther%2Fdocker-verb/lists"}