buildkit/MaintainerDeprecated¶
MAINTAINER instruction is deprecated in favor of using label.
| Property | Value |
|---|---|
| Severity | Warning |
| Category | Best Practice |
| Default | Enabled |
| Auto-fix | Yes (--fix) |
Description¶
The MAINTAINER instruction, used historically for specifying the author of
the Dockerfile, is deprecated. To set author metadata for an image, use the
org.opencontainers.image.authors OCI label instead.
Examples¶
Bad:
Good:
Auto-fix¶
The fix replaces MAINTAINER with an equivalent
org.opencontainers.image.authors label.
# Before
MAINTAINER John Doe <john@example.com>
# After (with --fix)
LABEL org.opencontainers.image.authors="John Doe <john@example.com>"