Skip to content
Evergreen Evergreen
Documentation

The Dockerfile legacy “ENV key value” form is deprecated

Deprecated. The source gives no day. Replacement: The ENV key=value form, with the value quoted when it contains spaces. Source: Docker build check: LegacyKeyValueFormat.

Check a version:

evergreen check pkg:generic/dockerfile

Docker’s LegacyKeyValueFormat build check flags the space-separated ENV form and recommends writing each assignment as key=value.

Look up another package or runtime · <form action="../lookup.html" method="get" role="search"> </form>

   
Status Deprecated
Severity low
Ecosystem container
Component pkg:generic/dockerfile
Affected versions vers:semver/*
Date from the source The source gives no day
Replacement The ENV key=value form, with the value quoted when it contains spaces
Evidence last seen 2026-10-31
Reviewed 2026-10-31 by arminazimi
Review due 2027-10-31 (365 days after the last review)
Rule ID container.dockerfile.legacy-env-format

Sources

Migration

Constraints

  • Keep the variable name and its value unchanged.
  • Use one key=value assignment per variable.

Steps

  1. Write the variable as key=value. Replace ENV key value with ENV key=”value”, quoting the value when it contains spaces.

Verification

  • docker build .: Build the image with the rewritten Dockerfile.
  • docker run --rm IMAGE env: Confirm the variable keeps its name and value.

Detected by

The container detector. See Detectors and Compatibility.

Other versions of this product

Same ecosystem

Data

This page is generated from registry/container.json, rule container.dockerfile.legacy-env-format, in the ebb.registry.v2 format (how rules are written). A CLE (ECMA-428) export is not published yet. The same facts are embedded in this page as schema.org structured data.

Last updated