forked from GoogleCloudPlatform/microservices-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cartservice debug profile + Dockerfile.debug (GoogleCloudPlatform#571)
* suse dotnet binary to start cartservice so its debugable * use dockerfile.debug * readd newline * update skaffold.yaml copyright * kelsey PR changes
- Loading branch information
Showing
3 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build | ||
WORKDIR /app | ||
COPY . . | ||
RUN dotnet restore cartservice.csproj | ||
RUN dotnet build "./cartservice.csproj" -c Debug -o /out | ||
|
||
FROM build AS publish | ||
RUN dotnet publish cartservice.csproj -c Debug -o /out | ||
|
||
# Building final image used in running container | ||
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS final | ||
# Installing procps on the container to enable debugging of .NET Core | ||
RUN apt-get update \ | ||
&& apt-get install -y unzip procps wget | ||
RUN GRPC_HEALTH_PROBE_VERSION=v0.3.6 && \ | ||
wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \ | ||
chmod +x /bin/grpc_health_probe | ||
WORKDIR /app | ||
COPY --from=publish /out . | ||
ENV ASPNETCORE_URLS=http://*:7070 | ||
|
||
ENTRYPOINT ["dotnet", "cartservice.dll"] |