I need to pass some secrets to a docker file to build my Windows container image.
I learned how not do do it but not how to do it properly. For example, it's unsecure to pass the secret via BUILD-ARG because it can be leaked by an attacker by just viewing the image history. The preferred approach would be using a secret-type mount but seems to be not available for Windows Container.
My current approach is creating a secrets file and pass to the container but also this seems to be not so secure, even if I try to delete it with these steps:
COPY [secrets.txt, .]
RUN scriptWhereIUseMySecrets
RUN del secrets.txt
So, my question: does docker provide some mechanism for managing secrets when it comes to build a Windows container?