reverted productcatalog services (not using dbg for now)

This commit is contained in:
Hamidreza Asaadi 2018-11-18 16:48:21 +00:00
parent 69f157dbac
commit 756ca6ca58
2 changed files with 9 additions and 16 deletions

View file

@ -131,6 +131,10 @@ Find **Protocol Buffers Descriptions** at the [`./pb` directory](./pb).
- applies the `./kubernetes-manifests` deploying the application to
Kubernetes.
**Troubleshooting:** If you get "No space left on device" error on Google Cloud Shell,
you can build the images on Google Cloud Build:
[Enable the Cloud Build API](https://console.cloud.google.com/flows/enableapi?apiid=cloudbuild.googleapis.com), then run `skaffold run -p gcb` instead.
7. Find the IP address of your application, then visit the application on your
browser to confirm installation.

View file

@ -1,5 +1,5 @@
FROM golang:1.10-alpine AS builder
RUN apk add --no-cache ca-certificates git gcc g++ && \
RUN apk add --no-cache ca-certificates git && \
wget -qO/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 && \
chmod +x /go/bin/dep
@ -11,26 +11,15 @@ COPY Gopkg.* ./
RUN dep ensure --vendor-only -v
COPY . .
RUN go build -gcflags=all='-N -l' -o /productcatalogservice .
RUN go build -o /productcatalogservice .
FROM alpine AS release
RUN apk add --no-cache ca-certificates \
libc6-compat
RUN apk add --no-cache ca-certificates
RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \
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 /productcatalogservice
RUN wget -O go-cloud-debug https://storage.googleapis.com/cloud-debugger/compute-go/go-cloud-debug \
&& chmod 0755 go-cloud-debug
COPY --from=builder /productcatalogservice ./server
COPY products.json source-context.json* ./
COPY products.json .
EXPOSE 3550
ENTRYPOINT ["./go-cloud-debug", "-sourcecontext=source-context.json", \
"-appmodule=productcatalogservice", "-appversion=1.0.0" , \
"--", "/productcatalogservice/server"]
ENTRYPOINT ["/productcatalogservice/server"]