From 2911e027e9dfa8e4fc2b03f597e6834995a8c3a0 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 5 Nov 2021 17:30:00 +0000 Subject: [PATCH] build(run): add commands for running markdownlint --- markdownlint.Dockerfile | 5 +++++ run | 13 +++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 markdownlint.Dockerfile diff --git a/markdownlint.Dockerfile b/markdownlint.Dockerfile new file mode 100644 index 00000000..1b2295d2 --- /dev/null +++ b/markdownlint.Dockerfile @@ -0,0 +1,5 @@ +FROM node:14-alpine +ENTRYPOINT ["markdownlint"] +CMD ["/data"] +WORKDIR /root +RUN npm install -g markdownlint-cli diff --git a/run b/run index 265b0736..4f404d13 100755 --- a/run +++ b/run @@ -67,6 +67,19 @@ function artifact:build { docker container rm oliverdavies-uk-web } +function markdownlint:build { + docker image build . \ + -f markdownlint.Dockerfile \ + -t markdownlint +} + +function markdownlint:run { + docker container run --rm \ + -v $(pwd)/.markdownlint.yaml:/root/.markdownlint.yaml \ + -v $(pwd)/source:/data \ + markdownlint +} + function sh { DC=run _dc --entrypoint sh app