To flex my Coffeescript muscle I wrote a tool called Dockerlint a while ago. At the time there were already several projects with this obvious name, however none actually did The Right Thing. Either they were placeholders/vaporware or they had two checks.

Instead of coming up with arbitrary Dos and Donts, Dockerlint follows two documents as set forth by Docker Inc.:

I try to keep up with Docker’s insane release schedule (closing in to releasing 4 new major versions each week?), however lately there haven’t been many changes to the Dockerfile format/instructions.

There are two ways to install/run Dockerlint: using NPM or with a Docker container:

npm

If you already have Node.JS installed (this also works on Windows with dockerlint >= 0.1.3), you can install it with:

npm install -g dockerlint

Then you can run:

dockerlint -f /path/to/Dockerfile

container

Alternatively fetch the container:

docker pull redcoolbeans/dockerlint

Now you can validate the Dockerfile using a read-only volume:

docker run -it --rm -v "$PWD/Dockerfile":/Dockerfile:ro redcoolbeans/dockerlint

If all goes well, you’ll see:

INFO: /Dockerfile is OK.

Bugs?

For any questions, bug reports or features suggestions, please file them over at GitHub: RedCoolBeans/dockerlint.