Skip to content

[BUG]: docker build --check complains about legacy ENV format #233

Closed
@amarburg

Description

@amarburg

Issue Description

Running docker build --check produces this warning:

WARNING: LegacyKeyValueFormat - https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
"ENV key=value" should be used instead of legacy "ENV key value" format
Dockerfile:214
--------------------
 212 |     
 213 |     # Env vars for the nvidia-container-runtime.
 214 | >>> ENV NVIDIA_VISIBLE_DEVICES all
 215 |     ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
 216 |     ENV QT_X11_NO_MITSHM 1
--------------------

WARNING: LegacyKeyValueFormat - https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
"ENV key=value" should be used instead of legacy "ENV key value" format
Dockerfile:215
--------------------
 213 |     # Env vars for the nvidia-container-runtime.
 214 |     ENV NVIDIA_VISIBLE_DEVICES all
 215 | >>> ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
 216 |     ENV QT_X11_NO_MITSHM 1
 217 |     
--------------------

WARNING: LegacyKeyValueFormat - https://docs.docker.com/go/dockerfile/rule/legacy-key-value-format/
"ENV key=value" should be used instead of legacy "ENV key value" format
Dockerfile:216
--------------------
 214 |     ENV NVIDIA_VISIBLE_DEVICES all
 215 |     ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
 216 | >>> ENV QT_X11_NO_MITSHM 1
 217 |     
--------------------

Steps to Reproduce

cd .docker && docker build --check .

Expected Behavior

No warnings

Error Message

see above

Runtime Environment

Ubuntu 20.04 on amd64 running Docker version 27.1.1, build 6312585

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions