docker swarm configs



To create a docker swarm config (allows sharing of configuration across application) when you runs a container, these config are 'mounted' into local container folder.

All you need to do is run the following command :-

docker config create "your_config_name" physical_settings_file

Then it will be registered into your system.


Using Configs. 

To use it you can

Manual

docker service create --name redis --config your_config_name redis:alpine
With this command, you are placing your settings files on the root of a running container.


With Docker-compose

docker stack deploy --compose-file docker-compose.yml myApplicationDeployment 



This is a windows container deployment on a swarm. And config files will be mounted on c:\Settings with filename settings.shared.yml.







Comments

Popular posts from this blog

The specified initialization vector (IV) does not match the block size for this algorithm