Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify config when creating a service #333

Open
heppth opened this issue Aug 21, 2018 · 3 comments
Open

How to specify config when creating a service #333

heppth opened this issue Aug 21, 2018 · 3 comments

Comments

@heppth
Copy link

heppth commented Aug 21, 2018

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<PortConfig>()
                        {
                            new PortConfig() { Name = "HTTP", Protocol = "tcp", TargetPort = 80, PublishedPort = 5000, PublishMode = "ingress" }
                        }
                    },
                    Name = name
                }
            });
@jterry75
Copy link
Contributor

Unfortunately the version of the Docker API this library supports ATM didn't have this option. It will require a version update but I will add this as a feature request for the next version.

@m-barthelemy
Copy link

Hi, is there anything blocking/preventing this to be added? And in general, anything that explains why there has been no new feature or release in quite a few months?

mdarocha pushed a commit to TrapTech/Docker.DotNet that referenced this issue Jul 11, 2022
Add support for .NET Standard 2.0
mdarocha pushed a commit to TrapTech/Docker.DotNet that referenced this issue Jul 11, 2022
Add support for .NET Standard 2.0
@dazinator
Copy link

think this can be closed RE #609

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants