{"id":16162110,"url":"https://github.com/peterdavehello/docker-markdownlint","last_synced_at":"2025-03-18T22:30:58.514Z","repository":{"id":39855742,"uuid":"245384776","full_name":"PeterDaveHello/docker-markdownlint","owner":"PeterDaveHello","description":"🐳 Dockerized markdown-cli with proper versioning, a command line lint tool for Markdown/CommonMark files.","archived":false,"fork":false,"pushed_at":"2025-01-25T07:45:17.000Z","size":13,"stargazers_count":5,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T00:07:37.612Z","etag":null,"topics":["ci","cli","commonmark","continuous-integration","docker","hacktoberfest","lint","linter","markdown","markdownlint"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/peterdavehello/markdownlint/","language":"Shell","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/PeterDaveHello.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"PeterDaveHello","open_collective":"peterdavehello","ko_fi":"peterdavehello","liberapay":"PeterDaveHello","issuehunt":"peterdavehello"}},"created_at":"2020-03-06T09:55:59.000Z","updated_at":"2025-03-02T15:13:52.000Z","dependencies_parsed_at":"2024-05-30T21:49:07.713Z","dependency_job_id":null,"html_url":"https://github.com/PeterDaveHello/docker-markdownlint","commit_stats":null,"previous_names":[],"tags_count":55,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-markdownlint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-markdownlint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-markdownlint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PeterDaveHello%2Fdocker-markdownlint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PeterDaveHello","download_url":"https://codeload.github.com/PeterDaveHello/docker-markdownlint/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244318457,"owners_count":20433907,"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":["ci","cli","commonmark","continuous-integration","docker","hacktoberfest","lint","linter","markdown","markdownlint"],"created_at":"2024-10-10T02:29:05.491Z","updated_at":"2025-03-18T22:30:58.277Z","avatar_url":"https://github.com/PeterDaveHello.png","language":"Shell","readme":"# docker-markdownlint\n\n[![Build Status](https://app.travis-ci.com/PeterDaveHello/docker-markdownlint.svg?branch=master)](https://app.travis-ci.com/PeterDaveHello/docker-markdownlint)\n[![Docker Hub pulls](https://img.shields.io/docker/pulls/peterdavehello/markdownlint.svg)](https://hub.docker.com/r/peterdavehello/markdownlint/)\n\n[![Docker Hub badge](http://dockeri.co/image/peterdavehello/markdownlint)](https://hub.docker.com/r/peterdavehello/markdownlint/)\n\nDockerized [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) with various versions, easy to use and easy to integrate with CI.\n\n## Table of Contents\n\n- [Usage](#usage)\n  - [Command line](#command-line)\n    - [Use the latest version](#use-the-latest-version)\n    - [Use specific version](#use-specific-version)\n  - [Continuous Integration (CI)](#continuous-integration-ci)\n    - [Travis CI](#travis-ci)\n    - [GitLab CI](#gitlab-ci)\n- [markdownlint cli usage](#markdownlint-cli-usage)\n- [Build](#build)\n\n## Usage\n\n### Command line\n\n#### Use the latest version\n\nWithout speicifying a image tag, the `latest` tag will be used as the latest version of markdownlint-cli:\n\n```sh\ndocker run -v $PWD:/md peterdavehello/markdownlint markdownlint .\n```\n\n- Replace `$PWD` with path of markdown files, `$PWD` means the current working directory.\n- If you don't want to scan all the markdown files recursively, replace `.` with the specify the file path and name.\n\n#### Use specific version\n\nJust like above, but specify a version tag of markdownlint-cli, for example, `0.35.0`:\n\n```sh\ndocker run -v $PWD:/md peterdavehello/markdownlint:0.35.0 markdownlint .\n```\n\n### Continuous Integration (CI)\n\n#### Travis CI\n\nEnable Docker service in your `.travis.yml`:\n\n```yaml\nservices:\n  - docker\n```\n\nAnd use the same command in the `scripts` part as the command line mentions, for example:\n\n```yaml\nservices:\n  - docker\n\nscripts:\n  - docker run -v $TRAVIS_BUILD_DIR:/md peterdavehello/markdownlint:0.35.0 markdownlint example.md\n```\n\nThis will lint a example markdown file called `example.md`\n\n#### GitLab CI\n\nAdd this block to your `.gitlab-ci.yml`:\n\n```yaml\nmarkdownlint:\n  stage: lint\n  variables:\n    markdownlint_cli_version: \"0.35.0\"\n  image: peterdavehello/markdownlint:$markdownlint_cli_version\n  only:\n    changes:\n      - \"**/*.md\"\n      - \"**/*.markdown\"\n  script:\n    - markdownlint .\n```\n\n## markdownlint cli usage\n\nJust pass `-h`/`--help` to markdownlint to get its help message, for example:\n\n- `docker run peterdavehello/markdownlint markdownlint --help`\n\nYou'll get the output like below:\n\n```text\n  Usage: markdownlint [options] \u003cfiles|directories|globs\u003e\n\n  MarkdownLint Command Line Interface\n\n  Options:\n    -V, --version                               output the version number\n    -c, --config [configFile]                   configuration file (JSON, JSONC, JS, or YAML)\n    -d, --dot                                   include files/folders with a dot (for example `.github`)\n    -f, --fix                                   fix basic errors (does not work with STDIN)\n    -i, --ignore [file|directory|glob]          file(s) to ignore/exclude (default: [])\n    -j, --json                                  write issues in json format\n    -o, --output [outputFile]                   write issues to file (no console)\n    -p, --ignore-path [file]                    path to file with ignore pattern(s)\n    -q, --quiet                                 do not write issues to STDOUT\n    -r, --rules  [file|directory|glob|package]  include custom rule files (default: [])\n    -s, --stdin                                 read from STDIN (does not work with files)\n    --enable [rules...]                         Enable certain rules, e.g. --enable MD013 MD041 --\n    --disable [rules...]                        Disable certain rules, e.g. --disable MD013 MD041 --\n    -h, --help                                  display help for command\n```\n\nFor more details, check out the [markdownlint-cli project](https://www.npmjs.com/package/markdownlint-cli) page.\n\n## Build\n\nBuild command, you need to specify a valid markdownlint version argument to `MARKDOWNLINT_CLI_VER`:\n\n```sh\ndocker build --build-arg MARKDOWNLINT_CLI_VER=\"0.35.0\" -t docker-markdownlint .\n\n# Replace \"docker-markdownlint\" with the preferred image name\n```\n\nYou can find a valid version on [markdownlint-cli](https://www.npmjs.com/package/markdownlint-cli?activeTab=versions) npm registry page, or just poke the [registry](https://registry.npmjs.org/markdownlint-cli) to retrieve more details.\n","funding_links":["https://github.com/sponsors/PeterDaveHello","https://opencollective.com/peterdavehello","https://ko-fi.com/peterdavehello","https://liberapay.com/PeterDaveHello","https://issuehunt.io/r/peterdavehello"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdavehello%2Fdocker-markdownlint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterdavehello%2Fdocker-markdownlint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterdavehello%2Fdocker-markdownlint/lists"}