Open tmds opened 12 months ago
This is a good request, and one that some users have asked for, especially with repositories like GitHub Packages that use a username or project name as a 'namespace'.
We should do this, but consider more names for the proposed new placeholder - for example ContainerNamespace or something. ContainerRepositoryBase is the most technically correct, I just wonder about what users will look for/expect.
I'm the same requirement,
seeing that is not close I suppose it's not available right now , so for those who are interested in this , here is a tips.
You can modify your csproj with :
<Target Name="SetContainerRepositoryBase" DependsOnTargets="$(PublishContainerDependsOn)" BeforeTargets="PublishContainer">
<PropertyGroup>
<ContainerRepository Condition=" '$(ContainerRepositoryBase)'!='' ">$(ContainerRepositoryBase)/$(ContainerRepository)</ContainerRepository>
</PropertyGroup>
</Target>
and use the property in the cli :
dotnet publish --os linux --arch x64 -p ContainerRepositoryBase=MyPrefix /t:PublishContainer
The container tooling will derive a name for the image based on the assembly name, and that name can be overridden by setting the
ContainerRepository
property.When pushing to an image registry the name needs to be prefixed to have separate namespaces for users, apps, ...
This request is to have a property separate from
ContainerRepository
that allows to set this prefix.Suggested name:
ContainerRepositoryBase
.Example
in the csproj:
Publish with
ContainerRepositoryBase
set:This publishes
quay.io/tmds/webstore/frontend
.cc @baronfel