mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-22 14:23:53 -07:00
Dockerize shellcheck
This commit is contained in:
parent
6a71ff6f46
commit
7c5387d58c
2 changed files with 23 additions and 0 deletions
18
docker/Dockerfile
Normal file
18
docker/Dockerfile
Normal 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
5
docker/README.md
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue