build(run): add commands for running markdownlint

This commit is contained in:
Oliver Davies 2021-11-05 17:30:00 +00:00
parent b742b1d8a1
commit 2911e027e9
2 changed files with 18 additions and 0 deletions

5
markdownlint.Dockerfile Normal file
View file

@ -0,0 +1,5 @@
FROM node:14-alpine
ENTRYPOINT ["markdownlint"]
CMD ["/data"]
WORKDIR /root
RUN npm install -g markdownlint-cli

13
run
View file

@ -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