dotnet / dotnet/Docker.DotNet

`string` constructor for the `CreateContainerParameters` or `Config` classes

Open
#257 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.4k
Forks
416
PR merge metrics
No merged PRs in 30d

Description

It would be nice to have a string constructor for `Docker.DotNet.Models.CreateContainerParameters` or `Docker.DotNet.Models.Config` that would allow you to provide a valid [Docker API JSON string](https://docs.docker.com/engine/api/v1.25/#operation/ContainerCreate) to construct either the `CreateContainerParameters` or `Config` objects.

Currently, I have to take such a string, validate it and use it to construct the `Config` class. Then I take the newly minted `Config` object and use it to construct the `CreateContainerParameters` class.

This scenario seems like a common enough use case, and having a string constructor would greatly simply/standardize your user's workflow.

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.