Windows 2016 Datacenter w/Container에 설치된 개발 클러스터의 단일 노드에 간단한 컨테이너를 배포 할 수 없습니다. 패키지가 배포되지만 파티션 상태는 항상 "빌드 중"입니다. 아래에 응용 프로그램 및 서비스 매니페스트를 포함했습니다.서비스 패브릭에 Windows 게스트 컨테이너 호스팅
내가 할 수있는 원격 컴퓨터에 수동으로 다음 명령을 사용하여 컨테이너를 실행
컨테이너가 실행docker run --name nanoiis -d -it -p 80:80 nanoserver/iis.
, 내가 원격 시스템에서 실행 IIS의 인스턴스를 얻을 수 있습니다. 문서화 된 NAT 문제로 인해 호스트의 localhost를 사용하여 컨테이너에 연결할 수 없습니다.
이제 Service Fabric에서 컨테이너를 실행해야합니다. 나는 5.4.145.9494를 설치했다. 이 런타임 버전의 컨테이너 지원은 미리보기로되어 있지만이 간단한 유스 케이스가 작동해서는 안되는 것을 알고 있습니다.
응용 프로그램 매니페스트
<?xml version="1.0" encoding="utf-8"?>
<ApplicationManifest ApplicationTypeName="ContainerSampleType"
ApplicationTypeVersion="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Parameters>
<Parameter Name="IISContainer_InstanceCount" DefaultValue="1" />
</Parameters>
<ServiceManifestImport>
<ServiceManifestRef ServiceManifestName="IISContainerPkg" ServiceManifestVersion="1.0.0" />
<Policies>
<ContainerHostPolicies CodePackageRef="Code">
<PortBinding ContainerPort="80" EndpointRef="IISContainerTypeEndpoint"/>
</ContainerHostPolicies>
</Policies>
</ServiceManifestImport>
<DefaultServices>
<Service Name="IISContainer">
<StatelessService ServiceTypeName="IISContainerType" InstanceCount="[IISContainer_InstanceCount]">
<SingletonPartition />
</StatelessService>
</Service>
</DefaultServices>
</ApplicationManifest>
서비스 매니페스트
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="IISContainerPkg"
Version="1.0.0"
xmlns="http://schemas.microsoft.com/2011/01/fabric"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ServiceTypes>
<StatelessServiceType ServiceTypeName="IISContainerType" UseImplicitHost="true" />
</ServiceTypes>
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<ContainerHost>
<ImageName>nanoserver/iis:latest</ImageName>
</ContainerHost>
</EntryPoint>
</CodePackage>
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<Endpoint Name="IISContainerTypeEndpoint" UriScheme="http" Protocol="http" Port="80"/>
</Endpoints>
</Resources>
</ServiceManifest>
포트를 명시 적으로 노출 시키면 트릭을 수행했습니다. 감사! – CJL