Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proxy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func DeployFunction(fprocess string, gateway string, functionName string, image
} else if language == "ruby" {
fprocessTemplate = "ruby index.rb"
} else if language == "csharp" {
fprocessTemplate = "dotnet ./bin/Debug/netcoreapp2.0/root.dll"
fprocessTemplate = "dotnet ./root.dll"
}

gateway = strings.TrimRight(gateway, "/")
Expand Down
22 changes: 14 additions & 8 deletions template/csharp/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
FROM microsoft/dotnet:2.0-sdk
FROM microsoft/dotnet:2.0-sdk as builder

ENV DOTNET_CLI_TELEMETRY_OPTOUT 1

WORKDIR /root/
WORKDIR /root/src
COPY . .
RUN dotnet restore ./root.csproj
RUN dotnet publish -c release -o published

FROM microsoft/dotnet:2.0-runtime

#ADD https://github.com/alexellis/faas/releases/download/0.6.1/fwatchdog /usr/bin
RUN apt-get update -qy \
Expand All @@ -10,14 +20,10 @@ RUN apt-get update -qy \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV DOTNET_CLI_TELEMETRY_OPTOUT 1

WORKDIR /root/
WORKDIR /root/src
COPY . .
RUN dotnet restore ./root.csproj
RUN dotnet build
COPY --from=builder /root/src/published .

ENV fprocess="dotnet ./bin/Debug/netcoreapp2.0/root.dll"
ENV fprocess="dotnet ./root.dll"
EXPOSE 8080
CMD ["fwatchdog"]