dive icon indicating copy to clipboard operation
dive copied to clipboard

How to view docker secrets in a Dockerfile

Open AmirulAndalib opened this issue 3 years ago • 3 comments
trafficstars

Hi

Screenshot_20220721-101930

Is there any way to view this docker secret?

AmirulAndalib avatar Jul 21 '22 04:07 AmirulAndalib

Secrets not stored inside container. It's stored on host - you should set them yourself to desired values before running container.

rufanov avatar Jul 22 '22 12:07 rufanov

Secrets not stored inside container. It's stored on host - you should set them yourself to desired values before running container.

It's. Not mine but I wanted to explore it out

AmirulAndalib avatar Jul 22 '22 12:07 AmirulAndalib

@AmirulAndalib , no, they don't. Docker/Podman/Kubernetes just mounts secret data to /run/secrets/<secret_name> file's, so app inside container can read it at runtime.

This feature made exactly as simple way to manage secret data(passwords, private keys, etc) that should never be stored inside container.

rufanov avatar Jul 22 '22 13:07 rufanov