You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I found the following issue while using the package. It's nothing serious, but if you have a bit of time, please take a look.
Thanks for everything, have a nice day!
ISSUE:
When using the DockerUri.Build(...) method with name, tag and work directory the created image is not tagged with the specified values. The workaround is to add a ContainerBuildParams object to the call with a non-null Tags array.
// NOT TAGGEDvarbuildResult=docker.Host.Build("my-app","latest","..\\..\\MyApp");
The offending code from the package seems to be the following:
publicstaticCommandResponse<IList<string>>Build(thisDockerUrihost,stringname,stringtag,stringworkdir=null,ContainerBuildParamsprms=null,ICertificatePathscertificates=null){if(null==tag){tag="latest";}if(string.IsNullOrEmpty(workdir)){workdir=".";}varoptions=string.Empty;// NOTE:// If prms or the Tags property within is null, the tags are not added.// That's why adding a ContainerBuildParams with an empty Tags array works.if(null!=prms?.Tags){// ANOTHER NOTE:// This comparison is also a bit weird, because the prms.Tags will contain full 'name:tag' values,// but the tag will only contain the 'tag' itself.if(!prms.Tags.Any(x =>x==tag)){options=$"-t {name}:{tag}";}}if(null!=prms){options+=$" {prms}";}returnnewProcessExecutor<StringListResponseParser,IList<string>>("docker".ResolveBinary(),$"{host.RenderBaseArgs(certificates)} build {options}{workdir}").Execute();}
The text was updated successfully, but these errors were encountered:
Hi!
I found the following issue while using the package. It's nothing serious, but if you have a bit of time, please take a look.
Thanks for everything, have a nice day!
ISSUE:
When using the
DockerUri.Build(...)
method with name, tag and work directory the created image is not tagged with the specified values. The workaround is to add aContainerBuildParams
object to the call with a non-nullTags
array.The offending code from the package seems to be the following:
The text was updated successfully, but these errors were encountered: