Dockerfile unknown flag --chown

Is there a way to use the --chown flag to ADD or COPY? The documentation here just links to the docker documentation which describes this flag, but when I try to use it I see:

[main]     Step 27/39 : COPY --chown=pi:pi src src
[Info]     Uploading images
[main]     Unknown flag: chown
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: Unknown flag: chown
[Error]    Not deploying release.

Hi there, as the flag isn’t working you can always use RUN to execute chown as the next step after the copy. If there’s a reason why this doesn’t work in your use case let us know and we can investigate further.

OK, thank you.