Skip to content

fix: replace deprecated MAINTAINER with LABEL in Dockerfile#84

Open
Copilot wants to merge 2 commits intomasterfrom
copilot/replace-deprecated-maintainer-in-dockerfile
Open

fix: replace deprecated MAINTAINER with LABEL in Dockerfile#84
Copilot wants to merge 2 commits intomasterfrom
copilot/replace-deprecated-maintainer-in-dockerfile

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 8, 2026

The MAINTAINER Dockerfile instruction has been deprecated since Docker 1.13, producing a MaintainerDeprecated build warning.

Change

Replaced MAINTAINER with the OCI-compliant LABEL instruction:

# Before
MAINTAINER Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>

# After
LABEL org.opencontainers.image.authors="Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>"
Original prompt

The Dockerfile at the repository root uses the deprecated MAINTAINER instruction on line 3:

MAINTAINER Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>

This produces a deprecation warning during Docker builds:

MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label. More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Required Change

Replace line 3 of the Dockerfile:

Before:

MAINTAINER Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>

After:

LABEL org.opencontainers.image.authors="Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>"

This follows the OCI image specification and eliminates the deprecation warning.

The following is the prior conversation context from the user's chat exploration (may be truncated):

User: The MAINTAINER instruction is deprecated, use a label instead to define an image author: Dockerfile#L3
MaintainerDeprecated: Maintainer instruction is deprecated in favor of using label More info: https://docs.docker.com/go/dockerfile/rule/maintainer-deprecated/

Assistant: Based on the workflow run and the Dockerfile warning you shared, the issue is clear:

The MAINTAINER instruction on line 3 of the Dockerfile is deprecated. Docker now recommends using an OCI LABEL instead.

The Fix

Replace line 3:

MAINTAINER Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>

With:

LABEL org.opencontainers.image.authors="Open Identity Platform Community <open-identity-platform-openidm@googlegroups.com>"

Details

  • The MAINTAINER Dockerfile instruction has been deprecated since Docker 1.13 (January 2017).
  • The recommended replacement is the LABEL instruction with the org.opencontainers.image.authors key, which follows the OCI image spec.
  • This is currently surfaced as a build warning (not a build failure), but it's best practice to fix it to stay compatible with future Docker versions that may treat it as an error.

The workflow run itself did not have any failing jobs — this warning is non-fatal. However, fixing it will eliminate the deprecation notice and keep the Dockerfile aligned with modern best practices.

Would you like me to create a pull request to apply this fix?

User: create a pull request

Assistant: I've kicked off the pull request creation process. We're now waiting for your confirmation to proceed — please accept or reject the tool call in the dialog to continue.

This pull request was created from Copilot chat.

Copilot AI changed the title [WIP] Replace deprecated MAINTAINER instruction in Dockerfile fix: replace deprecated MAINTAINER with LABEL in Dockerfile Apr 8, 2026
Copilot AI requested a review from vharseko April 8, 2026 09:51
@vharseko vharseko marked this pull request as ready for review April 8, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants