dotnet / dotnet/Docker.DotNet

How to specify config when creating a service

Open
#333 3 comments 0 reactions 0 assignees View on GitHub
feature request
Dominant language
C#
Stars
2.4k
Forks
416
PR merge metrics
No merged PRs in 30d

Description

Hi,

I want to speficy a config when creating a service. like this:
docker service create -p 5000:80 --name test **--config src=testConfig,target="app/testconfig.txt"** myImage

How can I pass the configuration in the following code?

There seems to be no possibility to specify this
```
await client.Swarm.CreateServiceAsync(new ServiceCreateParameters()
{
Service = new ServiceSpec()
{
TaskTemplate = new TaskSpec
{
ContainerSpec = new ContainerSpec()
{
Image = "mirasoftde/test:aspnetapp"
}
},
EndpointSpec = new EndpointSpec()
{
Ports = new List()
{
new PortConfig() { Name = "HTTP", Protocol = "tcp", TargetPort = 80, PublishedPort = 5000, PublishMode = "ingress" }
}
},
Name = name
}
});

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.