Dockerize shellcheck

This commit is contained in:
soulmachine 2016-08-01 13:12:45 -07:00
commit 7c5387d58c
2 changed files with 23 additions and 0 deletions

18
docker/Dockerfile Normal file
View file

@ -0,0 +1,18 @@
FROM ubuntu:16.04
MAINTAINER koalaman <koalaman@gmail.com>
RUN apt-get update -qqy
RUN apt-get -qqy install haskell-platform
RUN cabal update
RUN cabal install shellcheck
# Clean apt cache
RUN apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* \
rm -rf /var/cache/*.tar.gz \
rm -rf /var/cache/*/*.tar.gz
ENTRYPOINT ["/root/.cabal/bin/shellcheck"]

5
docker/README.md Normal file
View file

@ -0,0 +1,5 @@
This docker image wraps [shellcheck](https://github.com/koalaman/shellcheck) as a single executable.
How to use it? For example, you have a shell script named `sample.sh` under the current directory, you can lint it by running:
docker run -v $(pwd):/tmp/work shellcheck /tmp/work/sample.sh