You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MAINTAINER to LABEL conversion does not escape embedded quotes #70
Rewriting MAINTAINER into LABEL org.opencontainers.image.authors="..." wraps the value in double quotes without escaping the quotes it already contains.
Reproduce
FROM alpine
MAINTAINER Jane Doe "jane@example.com"
dockerfmt Dockerfile
Actual
FROM alpine
LABEL org.opencontainers.image.authors="Jane Doe "jane@example.com"
The quotes no longer pair up, and docker build fails on the output:
failed to process "\"Jane Doe \"jane@example.com\"": unexpected end of statement while looking for matching double-quote
Expected
Escape embedded quotes:
LABEL org.opencontainers.image.authors="Jane Doe \"jane@example.com\""
Leaving MAINTAINER unchanged when the value contains a quote would also work.
Impact
With --write the Dockerfile no longer builds. One of the three MAINTAINER lines in a sample of about 450 real-world Dockerfiles had quotes in its value.
Activity
RyoKusnadi commentedon Nov 5, 2026
@reteps I opened #75 for this. Could you please review it when you have a moment? Thank you!