How to fix Dockerfile parse error line 10: MAINTAINER is deprecated in Docker

DockerBEGINNERLOWUpdated Dec 6, 2025ยท 131 views

This warning appears when Docker encounters the deprecated MAINTAINER instruction in your Dockerfile. Replace it with the LABEL instruction using the org.opencontainers.image.authors key to specify maintainer metadata following modern OCI standards.

Quick fix

Fixes Dockerfile parse error line 10: MAINTAINER is deprecated

FROM ubuntu:22.04
MAINTAINER John Doe <john@example.com>
  1. Locate the MAINTAINER instruction
  2. Replace MAINTAINER with LABEL
  3. Handle multiple maintainers
  4. Add additional OCI labels (optional)
docker โ€” error
FROM ubuntu:22.04
MAINTAINER John Doe <john@example.com>
Dockerfile parse error line 10: MAINTAINER is deprecated

What this error means

The MAINTAINER instruction was historically used in Dockerfiles to specify the author or maintainer of an image. However, this instruction has been deprecated since Docker 1.13.0 in favor of the more flexible LABEL instruction. When Docker parses your Dockerfile and encounters MAINTAINER, it will display a deprecation warning. While the build may still succeed, the warning indicates you're using an outdated practice that may be removed in future Docker versions. The deprecation exists because LABEL provides a standardized, more powerful approach to image metadata. Unlike MAINTAINER (which only accepts a single string), LABEL supports arbitrary key-value pairs, follows the OCI (Open Container Initiative) specification, and can be easily queried using `docker inspect`.

Typical symptoms

  • Build outputs warning: 'MAINTAINER is deprecated'
  • Linters like hadolint flag the MAINTAINER instruction
  • CI/CD pipelines fail due to Dockerfile validation rules
  • Code review tools mark MAINTAINER as deprecated
  • Docker build checks show MaintainerDeprecated warning

Common causes

  1. Using the legacy MAINTAINER instruction in Dockerfile
  2. Dockerfile was created before Docker 1.13.0 when MAINTAINER was standard
  3. Copying older Dockerfile examples from outdated documentation or tutorials
  4. Using base images or Dockerfile templates that haven't been updated

How to fix "Dockerfile parse error line 10: MAINTAINER is deprecated"

1Locate the MAINTAINER instruction

First, find the MAINTAINER line in your Dockerfile. It typically appears near the top, after the FROM instruction:

dockerfile
FROM ubuntu:22.04
MAINTAINER John Doe <john@example.com>

You can search for it with:

bash
grep -n "MAINTAINER" Dockerfile
2Replace MAINTAINER with LABEL

Replace the MAINTAINER instruction with LABEL using the standardized OCI key for author information.

Before (deprecated):

dockerfile
FROM ubuntu:22.04
MAINTAINER John Doe <john@example.com>

After (recommended - OCI standard):

dockerfile
FROM ubuntu:22.04
LABEL org.opencontainers.image.authors="John Doe <john@example.com>"

Alternative (simpler):

dockerfile
FROM ubuntu:22.04
LABEL maintainer="john@example.com"

The OCI standard (org.opencontainers.image.authors) is preferred for maximum compatibility with container tools and registries.

3Handle multiple maintainers

If you have multiple maintainers, include them in a single LABEL:

dockerfile
LABEL org.opencontainers.image.authors="John Doe <john@example.com>, Jane Smith <jane@example.com>"

Or use multiple labels for different purposes:

dockerfile
LABEL org.opencontainers.image.authors="Team Name <team@example.com>"
LABEL org.opencontainers.image.vendor="Company Name"
LABEL org.opencontainers.image.url="https://github.com/company/project"
4Add additional OCI labels (optional)

While updating your Dockerfile, consider adding other useful OCI standard labels:

dockerfile
LABEL org.opencontainers.image.authors="john@example.com"
LABEL org.opencontainers.image.title="My Application"
LABEL org.opencontainers.image.description="A containerized web application"
LABEL org.opencontainers.image.version="1.0.0"
LABEL org.opencontainers.image.source="https://github.com/user/repo"
LABEL org.opencontainers.image.licenses="MIT"

Or combine them in a single LABEL instruction:

dockerfile
LABEL org.opencontainers.image.authors="john@example.com" \
      org.opencontainers.image.title="My Application" \
      org.opencontainers.image.version="1.0.0"
5Verify the fix

Rebuild your image to confirm the warning is gone:

bash
docker build -t myimage:latest .

You can verify the labels are set correctly:

bash
docker inspect myimage:latest --format='{{json .Config.Labels}}' | jq

Or without jq:

bash
docker inspect myimage:latest | grep -A 10 '"Labels"'

Run hadolint to check for other Dockerfile issues:

bash
docker run --rm -i hadolint/hadolint < Dockerfile

Advanced notes

### OCI Image Specification Labels

The Open Container Initiative (OCI) defines standard label keys for container image metadata. Using these ensures compatibility across container runtimes and registries:

| Label | Purpose |
|-------|---------|
| org.opencontainers.image.authors | Contact details of maintainers |
| org.opencontainers.image.title | Human-readable title |
| org.opencontainers.image.description | Human-readable description |
| org.opencontainers.image.version | Version of the packaged software |
| org.opencontainers.image.source | URL to source code |
| org.opencontainers.image.licenses | License(s) under which contained software is distributed |
| org.opencontainers.image.vendor | Name of the distributing entity |
| org.opencontainers.image.created | Date and time on which the image was built (RFC 3339) |

### Dynamic Labels at Build Time

You can set labels dynamically using build arguments:

dockerfile
ARG BUILD_DATE
ARG VERSION
ARG VCS_REF

LABEL org.opencontainers.image.created="${BUILD_DATE}" \
      org.opencontainers.image.version="${VERSION}" \
      org.opencontainers.image.revision="${VCS_REF}"

Then build with:

bash
docker build \
  --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
  --build-arg VERSION=1.0.0 \
  --build-arg VCS_REF=$(git rev-parse --short HEAD) \
  -t myimage:latest .

### Querying Labels

Labels can be used to filter and organize images:

bash
# Find images by author
docker images --filter "label=org.opencontainers.image.authors=john@example.com"

# List all labels for an image
docker inspect --format='{{range $k, $v := .Config.Labels}}{{$k}}={{$v}}{{println}}{{end}}' myimage:latest

### Why MAINTAINER Was Deprecated

The MAINTAINER instruction had several limitations:
1. Only supported a single string value
2. Not part of the OCI specification
3. Couldn't be filtered or queried easily
4. No standardized format for the value
5. Mixing author info with other metadata wasn't possible

LABEL solves all these issues while providing a standardized, extensible approach to image metadata.

Frequently asked questions

What does "Dockerfile parse error line 10: MAINTAINER is deprecated" mean?
The MAINTAINER instruction was historically used in Dockerfiles to specify the author or maintainer of an image. 0 in favor of the more flexible LABEL instruction. When Docker parses your Dockerfile and encounters MAINTAINER, it will display a deprecation warning.
How do I fix "Dockerfile parse error line 10: MAINTAINER is deprecated"?
This warning appears when Docker encounters the deprecated MAINTAINER instruction in your Dockerfile. Replace it with the LABEL instruction using the org.opencontainers.image.authors key to specify maintainer metadata following modern OCI standards.
What causes "Dockerfile parse error line 10: MAINTAINER is deprecated"?
Using the legacy MAINTAINER instruction in Dockerfile Dockerfile was created before Docker 1.13.0 when MAINTAINER was standard Copying older Dockerfile examples from outdated documentation or tutorials
Is the "Dockerfile parse error line 10: MAINTAINER is deprecated" error serious?
It is a low-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading