Skip to main content

DCLint

https://github.com/zavoloklom/docker-compose-linter

A command-line tool for validating and enforcing best practices in Docker Compose files.

Vortex does not install DCLint. Please follow the instructions to install it on your system.

Usage

dclint docker-compose.yml

Ignoring

To ignore all DCLint rules within a file, place in the file header:

# dclint disable
version: '3.8'
services:
app:
image: ubuntu

To ignore only specific rules:

version: '3.8'
services:
# dclint disable-next-line no-version-field
app:
image: ubuntu

Ignoring fail in continuous integration pipeline

This tool runs in continuous integration pipeline by default and fails the build if there are any violations.

Set VORTEX_CI_DCLINT_IGNORE_FAILURE environment variable to 1 to ignore failures. The tool will still run and report violations, if any.