File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed
Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 1- # cartservice_probe
2- FROM golang:1.10 as builder
1+ FROM golang:1.10 as probe
32RUN wget -qO/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \
4- chmod +x /go/bin/dep
3+ chmod +x /go/bin/dep
54ENV PROJECT github.com/GoogleCloudPlatform/microservices-demo/src/cartservice/probe
65WORKDIR /go/src/$PROJECT
76COPY probe/Gopkg.* ./
87RUN dep ensure --vendor-only -v
98COPY ./probe ./
109RUN go build -o /cartservice_probe .
1110
12- # cartservice
13- FROM gcr.io/google-appengine/aspnetcore:2.1.0
14- COPY --from=builder /cartservice_probe /cartservice_probe
15- RUN apt-get update && apt-get install net-tools telnet
11+ FROM microsoft/dotnet:2.1-sdk-alpine as builder
1612WORKDIR /app
1713COPY . .
1814RUN dotnet restore && \
1915 dotnet build && \
20- dotnet publish
21- WORKDIR /app/bin/Debug/netcoreapp2.0
22- ENTRYPOINT ["dotnet" , "cartservice.dll" , "start" ]
16+ dotnet publish -c release -r linux-musl-x64 -o /cartservice
17+
18+ # cartservice
19+ FROM alpine:3.8
20+ # Add the probe
21+ COPY --from=probe /cartservice_probe /cartservice_probe
22+ # Dependencies for runtime
23+ # busybox-extras => telnet
24+ RUN apk add --no-cache \
25+ busybox-extras \
26+ libc6-compat \
27+ libunwind \
28+ libuuid \
29+ libgcc \
30+ libstdc++ \
31+ libintl \
32+ icu
33+ WORKDIR /app
34+ COPY --from=builder /cartservice .
35+ ENTRYPOINT ["./cartservice" , "start" ]
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >netcoreapp2.0 </TargetFramework >
5+ <TargetFramework >netcoreapp2.1 </TargetFramework >
66 </PropertyGroup >
77
88 <ItemGroup >
You can’t perform that action at this time.
0 commit comments