diff --git a/Taskfile.dist.yml b/Taskfile.dist.yml index 10cca2e..05995df 100644 --- a/Taskfile.dist.yml +++ b/Taskfile.dist.yml @@ -20,6 +20,13 @@ tasks: - task: build:apache - task: build:frankenphp + lint: + desc: Apply a Dockerfile linter to all Dockerfiles + cmds: + - task: lint:fpm + - task: lint:apache + - task: lint:frankenphp + build:fpm: desc: Build all PHP Docker image targets of the FPM variant deps: [lint:fpm] @@ -110,22 +117,23 @@ tasks: lint:fpm: desc: Apply a Dockerfile linter (https://github.com/hadolint/hadolint) cmds: - - task: lint + - task: do:lint vars: { DOCKERFILE_PATH: fpm/Dockerfile } lint:apache: desc: Apply a Dockerfile linter (https://github.com/hadolint/hadolint) cmds: - - task: lint + - task: do:lint vars: { DOCKERFILE_PATH: apache/Dockerfile } lint:frankenphp: desc: Apply a Dockerfile linter (https://github.com/hadolint/hadolint) cmds: - - task: lint + - task: do:lint vars: { DOCKERFILE_PATH: frankenphp/Dockerfile } - lint: + do:lint: + internal: true cmds: - docker run --interactive diff --git a/apache/Dockerfile b/apache/Dockerfile index d56e1cb..e81e19a 100644 --- a/apache/Dockerfile +++ b/apache/Dockerfile @@ -1,3 +1,6 @@ +# syntax=docker/dockerfile:1 +# check=error=true + # Latest version of PHP base image: https://hub.docker.com/_/php/tags FROM php:8.5.4-apache-trixie AS runtime diff --git a/fpm/Dockerfile b/fpm/Dockerfile index 7848564..a54ca02 100644 --- a/fpm/Dockerfile +++ b/fpm/Dockerfile @@ -1,3 +1,6 @@ +# syntax=docker/dockerfile:1 +# check=error=true + # Latest version of PHP base image: https://hub.docker.com/_/php/tags FROM php:8.5.4-fpm-trixie AS runtime diff --git a/frankenphp/Dockerfile b/frankenphp/Dockerfile index 308285e..a37b12b 100644 --- a/frankenphp/Dockerfile +++ b/frankenphp/Dockerfile @@ -1,3 +1,6 @@ +# syntax=docker/dockerfile:1 +# check=error=true + # Latest version of FrankenPHP base image: https://hub.docker.com/r/dunglas/frankenphp/tags FROM dunglas/frankenphp:1.12.1-php8.5.4-trixie AS runtime