Log into https://console.cloud.google.com/kubernetes/
https://cloud.google.com/kubernetes-engine/docs/tutorials/hello-app
This is the hello-app https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/tree/master/hello-app
git clone https://github.com/GoogleCloudPlatform/kubernetes-engine-samples
cd kubernetes-engine-samples/hello-ap
export PROJECT_ID="$(gcloud config get-value project -q)"
docker build -t gcr.io/${PROJECT_ID}/hello-app:v1 .
the Dockerfile being built is:
FROM golang:1.8-alpine ADD . /go/src/hello-app RUN go install hello-app FROM alpine:latest COPY --from=0 /go/bin/hello-app . ENV PORT 8080 CMD ["./hello-app"]
and this is the log
Sending build context to Docker daemon 9.216kB
Step 1/7 : FROM golang:1.8-alpine
1.8-alpine: Pulling from library/golang
550fe1bea624: Pull complete
cbc8da23026a: Pull complete
12508f45ab1b: Pull complete
f6a6c5429359: Pull complete
1c48badb8476: Pull complete
2866b24847ef: Pull complete
Digest: sha256:1b0930a92a5d478d3f93d8d3c06cb3c241262ccbf77de35eb617e202f58c9b76
Status: Downloaded newer image for golang:1.8-alpine
---> bbb7421a9337
Step 2/7 : ADD . /go/src/hello-app
---> ad8ee8aa671c
Removing intermediate container b8668e8cdedd
Step 3/7 : RUN go install hello-app
---> Running in c4b1bbf253a3
---> 9f8fb12fadc2
Removing intermediate container c4b1bbf253a3
Step 4/7 : FROM alpine:latest
latest: Pulling from library/alpine
ff3a5c916c92: Pull complete
Digest: sha256:8c03bb07a531c53ad7d0f6e7041b64d81f99c6e493cb39abba56d956b40eacbc
Status: Downloaded newer image for alpine:latest
---> 3fd9065eaf02
Step 5/7 : COPY --from=0 /go/bin/hello-app .
---> 490bb535a1a4
Removing intermediate container 617f13e84c40
Step 6/7 : ENV PORT 8080
---> Running in 828bf4c23c66
---> 4198dd25173f
Removing intermediate container 828bf4c23c66
Step 7/7 : CMD ./hello-app
---> Running in d009b6f24683
---> 0a8fed701a4d
Removing intermediate container d009b6f24683
Successfully built 0a8fed701a4d
Successfully tagged gcr.io/pippo-189911/hello-app:v1
>
No comments:
Post a Comment