You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perplexed but anxious that this is a trivial or obvious solution. The working Docker container (#3) is 1GB and expensive to move around. If it worked, it would be more convenient, to use Docker container (#2) as this is only 12MB.
FROM golang:1.8 as build
WORKDIR /go/src/app
COPY pubsub.go .
RUN go-wrapper download # "go get -d -v ./..."
RUN go-wrapper install
FROM gcr.io/distroless/base
COPY --from=build /go/bin/app /
CMD ["/app"]
build and run as before:
2017/11/27 17:32:06 Topic '$PUB' exists no need to recreate
2017/11/27 17:32:06 Message ID: 175919015426938
Perplexed but anxious that this is a trivial or obvious solution. The working Docker container (#3) is 1GB and expensive to move around. If it worked, it would be more convenient, to use Docker container (#2) as this is only 12MB.
Took this Golang sample:
https://github.com/GoogleCloudPlatform/golang-samples/blob/master/pubsub/pubsub_quickstart/main.go
https://cloud.google.com/pubsub/docs/reference/libraries
Extended it trivially to (a) reference environment variables; (b) publish a message too:
https://gist.github.com/DazWilkin/bd8300af9f3f9be0954573304775639b
1. Static build no container
Then:
and:
2. Containerize it
Dockerfile.scratch
and:
and appears to just block indefinitely on
pubsub.NewClient(...)
3. Containerize using golang|go-wrapper
Dockerfile.golang
and build using the above and same run:
Generates:
The text was updated successfully, but these errors were encountered: