wagoodman / dive

A tool for exploring each layer in a docker image
MIT License
45.76k stars 1.75k forks source link

How to view docker secrets in a Dockerfile #411

Open AmirulAndalib opened 2 years ago

AmirulAndalib commented 2 years ago

Hi

Screenshot_20220721-101930

Is there any way to view this docker secret?

rufanov commented 2 years ago

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

AmirulAndalib commented 2 years ago

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

rufanov commented 2 years ago

@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.