-
Notifications
You must be signed in to change notification settings - Fork 487
Closed
Description
- This is a bug report
- This is a feature request
- I searched existing issues before opening this one
Dockerfile Syntax 1.10.0 has been released, allowing secrets to be mounted as environment variables (+ file) rather than as a file.
Instead of target=<path> we can use env=<env_var_name>.
As it is brand new, the current rules do not allow this new field and raise an error.
Expected behavior
No error raised at all
Actual behavior
hadolint Dockerfile
Dockerfile.test:6:36 unexpected "env=ENV_VAR ec" expecting "gid=", "id=", "mode=", "required", "required=False", "required=True", "required=false", "required=true", "uid=", source=, or target=Steps to reproduce the behavior
Output of hadolint --version
Haskell Dockerfile Linter 2.12.0Dockerfile
# syntax=docker/dockerfile:1.10
FROM node:20
RUN --mount=type=secret,id=ENV_VAR,env=ENV_VAR echo "ENV_VAR=$ENV_VAR" > /tmp/env_varCommand run = docker build . --secret 'id=ENV_VAR,env=ENV_VAR'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels