Skip to content

Instantly share code, notes, and snippets.

@StefH
Created October 6, 2018 14:35
Show Gist options
  • Save StefH/a3b01cba4496cace230d955ab2802e8a to your computer and use it in GitHub Desktop.
Save StefH/a3b01cba4496cace230d955ab2802e8a to your computer and use it in GitHub Desktop.
Example Service Fabric ServiceManifest.xml for a Container
<?xml version="1.0" encoding="utf-8"?>
<ServiceManifest Name="WireMock_ContainerPkg"
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>
<!-- This is the name of your ServiceType.
The UseImplicitHost attribute indicates this is a guest service. -->
<StatelessServiceType ServiceTypeName="WireMock_ContainerType" UseImplicitHost="true" />
</ServiceTypes>
<!-- Code package is your service executable. -->
<CodePackage Name="Code" Version="1.0.0">
<EntryPoint>
<!-- Follow this link for more information about deploying Windows containers to Service Fabric: https://aka.ms/sfguestcontainers -->
<ContainerHost>
<ImageName>sheyenrath/wiremock.net-nano</ImageName>
<!--comma delimited list of commands for container-->
<!-- Pass commands https://stackoverflow.com/questions/52668237/how-to-specify-commandline-arguments-to-a-docker-container-in-azure-service-frab/52669138#52669138 -->
<Commands>--AllowPartialMapping false,--x y</Commands>
</ContainerHost>
</EntryPoint>
<!-- Pass environment variables to your container: -->
<EnvironmentVariables>
<EnvironmentVariable Name="AllowPartialMapping" Value="false"/>
</EnvironmentVariables>
</CodePackage>
<!-- Config package is the contents of the Config directoy under PackageRoot that contains an
independently-updateable and versioned set of custom configuration settings for your service. -->
<ConfigPackage Name="Config" Version="1.0.0" />
<Resources>
<Endpoints>
<!-- This endpoint is used by the communication listener to obtain the port on which to
listen. Please note that if your service is partitioned, this port is shared with
replicas of different partitions that are placed in your code. -->
<Endpoint Name="WireMock_ContainerTypeEndpoint" Port="9091" />
</Endpoints>
</Resources>
</ServiceManifest>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment