@@ -55,30 +55,30 @@ recreate the source files from this folder.
5555 app, see
5656 [ dockerizing a .NET core app] ( https://docs.microsoft.com/en-us/dotnet/core/docker/docker-basics-dotnet-core#dockerize-the-net-core-application ) .
5757
58- ``` docker
59- # Use Microsoft's official .NET image.
60- # https://hub.docker.com/r/microsoft/dotnet
61- FROM microsoft/dotnet:2.1-sdk
62-
63- # Install production dependencies.
64- # Copy csproj and restore as distinct layers.
65- WORKDIR /app
66- COPY *.csproj .
67- RUN dotnet restore
68-
69- # Copy local code to the container image.
70- COPY . .
71-
72- # Build a release artifact.
73- RUN dotnet publish -c Release -o out
74-
75- # Configure and document the service HTTP port .
76- ENV PORT 8080
77- EXPOSE $ PORT
78-
79- # Run the web service on container startup.
80- CMD ["dotnet", "out/helloworld-csharp.dll"]
81- ```
58+ ``` docker
59+ # Use Microsoft's official .NET image.
60+ # https://hub.docker.com/r/microsoft/dotnet
61+ FROM microsoft/dotnet:2.1-sdk
62+
63+ # Install production dependencies.
64+ # Copy csproj and restore as distinct layers.
65+ WORKDIR /app
66+ COPY *.csproj .
67+ RUN dotnet restore
68+
69+ # Copy local code to the container image.
70+ COPY . .
71+
72+ # Build a release artifact.
73+ RUN dotnet publish -c Release -o out
74+
75+ # Service must listen to $PORT environment variable .
76+ # This default value facilitates local development.
77+ ENV PORT 8080
78+
79+ # Run the web service on container startup.
80+ CMD ["dotnet", "out/helloworld-csharp.dll"]
81+ ```
8282
83831. Create a new file, `service.yaml` and copy the following service definition
8484 into the file. Make sure to replace `{username}` with your Docker Hub
0 commit comments