Currently we im a running application on a single docker container, the application needs all sorts of sensitive data to be passed as environments variables,
Im putting those on the run command so they don't end up in the image and then on a repository, however i end up with a very non-secure run command,
Now, i understand that docker secrets exist, however, how can i use them without deploying a cluster? or is there any other way to secure this data?
I switched to docker-compose because I wanted to use secrets. I am happy I did, it seems much more clean. Each service maps to a container. And if you ever want to switch to running a swarm instead, you are basically already there.
Note: Secrets are not loaded into the container's environment, they are mounted to /run/secrets/
4) Run this command from the project's root to see that the container does have access to your secret, (Docker must be running and docker-compose installed):