如何在Azure Service Fabric中为Docker容器指定命令行参数 [英] How to specify commandline arguments to a docker container in Azure Service Fabric
问题描述
我有一个docker映像 wiremock.net-nano ,它接受其他命令行参数,例如--Port
和--AdminUsername
.
I've a docker image wiremock.net-nano which accepts additional commandline parameters like --Port
and --AdminUsername
.
正常的docker命令行如下所示:
The normal docker commandline looks like:
docker run --rm -p 9091:80 sheyenrath/wiremock.net-nano --ReadStaticMappings true --AdminUsername x --AdminPassword y --RequestLogExpirationDuration 24
但是,如何在 Azure Service Fabric 中配置这些参数?
ServiceManifest.xml 文件仅定义映像名称(<ImageName>sheyenrath/wiremock.net-nano</ImageName>
)和端口转发(<Endpoint Name="WireMock_ContainerTypeEndpoint" Port="9091" />
).
But how can I configure these parameters in Azure Service Fabric?
The ServiceManifest.xml file defines only the image name (<ImageName>sheyenrath/wiremock.net-nano</ImageName>
) and port forwarding (<Endpoint Name="WireMock_ContainerTypeEndpoint" Port="9091" />
).
推荐答案
如果我没有记错的话,元素中的<ContainerHostEntryPointType>/<Commands>
就是您想要的.
If I am not mistaken the <ContainerHostEntryPointType>/<Commands>
in the element is what you are looking for.