0

If i declare docker secret on docker compose i'm not able to deploy in prd on remote docker machine secrets withous upload phisically secrets on remote machine. I think is not safe.

So, if i create manually secrets on remote docker machine how i can use by a container deployed by docker compose?

Gabriel Devillers
  • 3,155
  • 2
  • 30
  • 53
cuscode
  • 77
  • 1
  • 10
  • Docker Compose only works with a local Docker daemon (or a Swarm setup); the `docker-compose.yml`, any files or other content it references, and the running containers all need to be on the same system. – David Maze Nov 02 '18 at 18:54
  • Ok. Please can explain what is the best practice to upload file and sensitive data (like env or secrets) to the remote machine? in witch folder on the remote machine? best practice for continuous development? Thankyou – cuscode Nov 02 '18 at 20:46

1 Answers1

0

Secrets and other sensitive data can be uploaded via stdin over ssh, avoiding the need to copy the file to the remote server. I provided an example here: https://stackoverflow.com/a/53358618/2605742

This technique can be used to create secrets in swarm mode (even with a single-node swarm), or with docker compose, creating the containers without copying the docker-compose.yml file to the remote system.

nachbar
  • 2,643
  • 1
  • 24
  • 34