I'm working on creating a Docker service using dockerode, which is a wrapper around the Docker API. I'm having trouble understanding how to use the Secrets array when creating a service. The Docker documentation provides an example of what the Secrets array should look like for service creation, but I'm unsure how to use it effectively:
"Secrets": [{
"File": {
"Name": "www.example.org.key",
"UID": "33",
"GID": "33",
"Mode": 384
},
"SecretID": "fpjqlhnwb19zds35k8wn80lq9",
"SecretName": "example_org_domain_key"
}]
Now, I would like to translate the following Docker Swarm CLI command into API calls:
docker service create --secret source=wall_1_pass,target=wallet_password
What values should I put in the Secrets array parameters to achieve this through the API?