Testing and Deploying your Application

Running locally

Run your program locally with the native development tools that you usually use.

For example, go run.

Deploying your program

To deploy a Go app, use the aedeploy tool, which will correctly assemble your app's dependencies in the same way that the go tool does. Install aedeploy by running:

go get google.golang.org/appengine/cmd/aedeploy

Deploy your app by appending a gcloud app deploy command to aedeploy, like this:

aedeploy gcloud app deploy

It is good practice (though not required) to vendor your dependencies, since that keeps your dependencies stable. If you do, still use aedeploy.

Manually building a container for deployment

To build your container images outside of Google Cloud Platform, you must first upload your images to a container image repository before you can deploy your images to App Engine with the gcloud app deploy command.

For example, if you build your container images locally with Docker, you can push those images to Google Container Registry and then specify the URL of your image in the --image-url flag of the gcloud app deploy command:

gcloud app deploy --image-url gcr.io/my-project-id/my-container-image

Docker base images for Go

If you'd like to build a Go custom runtime application from scratch, you can use this base image in a Dockerfile:

Runtime Docker Command
Go FROM gcr.io/google_appengine/golang

Send feedback about...

App Engine flexible environment for Go