Access to secret while deploying

Can’t access secret files while deploy.

I’ve followed all instructions from this guide: Using Secrets with Docker | Render Docs

My dokerfile:

RUN --mount=type=secret,id=private_pem,dst=/etc/secrets/private.pem cat /etc/secrets/private.pem

RUN --mount=type=secret,id=public_pem,dst=/etc/secrets/public.pem cat /etc/secrets/public.pem

RUN --mount=type=secret,id=private_pem,dst=/etc/secrets/private.pem --mount=type=secret,id=public_pem,dst=/etc/secrets/public.pem gradle installDist

CMD cat /etc/secrets/private.pem && build/install/talent/bin/talent

My application properties:

rsa:
private-key: /etc/secrets/private.pem
public-key: /etc/secrets/public.pem

In shell I can see both secret files in directory /etc/secrets/

Error while deploying:

Hi Aleksandr,

I see this is already being handled with a support ticket. We’ll continue the conversation there to avoid duplicating threads.

Regards,

Matt

Solved with changing this in application.yml:
rsa:
private-key: file:/etc/secrets/private.pem
public-key: file:/etc/secrets/public.pem