Open GoogleCodeExporter opened 9 years ago
It looks like it could be the default Dockerfile from the SDK. As follows: #
Dockerfile extending the generic Go image with application files for a
# single application.
FROM gcr.io/google_appengine/golang
COPY . /go/src/app
RUN go-wrapper download
RUN go-wrapper install -tags appenginevm
gcloud-golang-todos example has a different Dockerfile:
FROM gcr.io/google_appengine/go-compat
# TODO: Remove once base image updates to 1.4.2 toolchain.
RUN rm -rf /goroot && mkdir /goroot && curl
https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar xvzf -
-C /goroot --strip-components=1
ADD . /app
RUN /bin/bash /app/_ah/build.sh
After changing the default Dockerfile, the app was able to run. However I was
not abled to deploy, see following error:
DEBUG: Host: appengine.google.com
DEBUG: _Authenticate configuring auth; needs_auth=False
DEBUG: Sending request to
https://appengine.google.com/api/vms/prepare?app_id=humming-au
headers={'X-appcfg-api-version': '1', 'content-length': '0', 'Content-Type':
'application/octet-stream'} body=
INFO: Attempting refresh to obtain initial access_token
INFO: Refreshing access_token
DEBUG: Got response: {bucket: vm-containers.humming-au.appspot.com, path:
/containers}
INFO: Refreshing access_token
DEBUG: Detected docker environment variables:
DOCKER_HOST=tcp://192.168.59.103:2376,
DOCKER_CERT_PATH=/Users/terry/.boot2docker/certs/boot2docker-vm,
DOCKER_TLS_VERIFY=1
INFO: Starting new HTTPS connection (1): 192.168.59.103
DEBUG: "GET /v1.10/_ping HTTP/1.1" 200 2
Updating module [default] from file [/Users/terry/go/src/demo/app.yaml]
INFO: Looking for the Dockerfile in /Users/terry/go/src/demo
INFO: Using Dockerfile found in /Users/terry/go/src/demo
INFO: Building docker image humming-au.default.20150502t131811 from
/Users/terry/go/src/demo/Dockerfile:
INFO: -------------------- DOCKER BUILD --------------------
DEBUG: "POST
/v1.10/build?pull=True&nocache=False&q=False&t=humming-au.default.20150502t13181
1&forcerm=False&rm=True HTTP/1.1" 200 None
INFO: Step 0 : FROM gcr.io/google_appengine/go-compat
INFO: ---> 0cd813bd386d
INFO: Step 1 : RUN rm -rf /goroot && mkdir /goroot && curl
https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz | tar xvzf -
-C /goroot --strip-components=1
INFO: ---> Using cache
INFO: ---> c04d5ca72d02
INFO: Step 2 : ADD . /app
INFO: ---> c9697e8b62c6
INFO: Removing intermediate container 92da1df4aede
INFO: Step 3 : RUN /bin/bash /app/_ah/build.sh
INFO: ---> Running in b49ad182f4a9
INFO: /bin/bash: /app/_ah/build.sh: No such file or directory
ERROR: The command [/bin/sh -c /bin/bash /app/_ah/build.sh] returned a non-zero
code: 127
INFO: --------------------------------------------------------
Traceback (most recent call last):
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 211, in <module>
main()
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 207, in main
_cli.Execute()
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 617, in Execute
result = args.cmd_func(cli=self, args=args)
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 1110, in Run
result = command_instance.Run(args)
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/calliope/exceptions.py", line 86, in TryFunc
return func(*args, **kwargs)
File "/Users/terry/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 143, in Run
info.runtime, docker_client)
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/push.py", line 64, in BuildAndPushDockerImage
nocache=False)) as image:
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/docker/containers.py", line 119, in __enter__
self.Build()
File "/Users/terry/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/docker/containers.py", line 188, in Build
raise ImageError(msg)
googlecloudsdk.appengine.lib.docker.containers.ImageError: Docker build
aborted: The command [/bin/sh -c /bin/bash /app/_ah/build.sh] returned a
non-zero code: 127
Original comment by terry.wa...@gmail.com
on 2 May 2015 at 3:25
I just saw the note on the appengine website, for go developers to use
appcfg.py to update the VM application.
This is no longer an issue unless you plan to use gcloud deploy.
Original comment by terry.wa...@gmail.com
on 2 May 2015 at 11:11
Hi, I'm trying to build a go app and running it in google cloud managed vm
flavour.
My first step is trying to launch the hello world demo app:
https://github.com/golang/appengine/tree/master/demos/guestbook
First of all, I got the error described above, after changing the Dockerfile, I
get lots of 'cannot find package xxxx', then I run 'go get', to download
dependencies, and it throws following error:
helloworld $ go get
go install: no install location for directory
/home/matias/sandbox/appengine/demos/helloworld outside GOPATH
helloworld $
GOPATH is set to /home/matias/sandbox/appengine/demos/helloworld
Lots of packages got downloaded, but it looks like not enough, I'm still
getting some 'cannot find pacakge':
helloworld $ gcloud preview app run app.yaml
INFO 2015-05-23 13:32:29,336 containers.py:280] 2015/05/23 13:32:29 Can't
find package "golang.org/x/text/encoding" in $GOPATH: cannot find package
"golang.org/x/text/encoding" in any of:
/goroot/src/golang.org/x/text/encoding (from $GOROOT)
/gopath/src/golang.org/x/text/encoding (from $GOPATH)
and lots of others...
Regards,
Matías.
Original comment by matias.b...@gmail.com
on 23 May 2015 at 1:34
It may have something to do with your GOPATH structure. Try and set you
structure and GOPATH as describe in this
https://golang.org/doc/code.html#Organization.
Original comment by terry.wa...@gmail.com
on 24 May 2015 at 12:17
Original issue reported on code.google.com by
terry.wa...@gmail.com
on 1 May 2015 at 10:58