This commit is contained in:
Frank Dai 2017-06-05 06:16:14 +00:00 committed by GitHub
commit 2f0339531f
2 changed files with 28 additions and 0 deletions

16
docker/Dockerfile Normal file
View file

@ -0,0 +1,16 @@
FROM ubuntu:16.04
MAINTAINER koalaman <koalaman@gmail.com>
RUN apt-get update -y && \
apt-get -y --no-install-recommends install git cabal-install && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/*
RUN git config --global http.sslVerify false
WORKDIR /root
RUN git clone https://github.com/koalaman/shellcheck.git
WORKDIR /root/shellcheck
RUN cabal update && cabal install
ENTRYPOINT ["/root/.cabal/bin/shellcheck"]

12
docker/README.md Normal file
View file

@ -0,0 +1,12 @@
This docker image wraps [shellcheck](https://github.com/koalaman/shellcheck) as a single executable.
## Build the image
cd shellcheck/docker
docker build -t shellcheck .
## 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