From 17edbb395741f7f3012db13d8c0e4e663ee34d4e Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 2 Nov 2021 17:36:00 -0400 Subject: [PATCH] docs: Mention other deployment targets (#461) --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75d9df14ae..13de07068e 100644 --- a/README.md +++ b/README.md @@ -94,19 +94,40 @@ gcr.io/my-project/app-099ba5bcefdead87f92606265fb99ac0@sha256:6e398316742b7aa4a9 Because the output of `ko publish` is an image reference, you can easily pass it to other tools that expect to take an image reference: -To run the container: +To run the container locally: ``` docker run -p 8080:8080 $(ko publish ./cmd/app) ``` -Or, for example, to deploy it to other services like +Or to deploy it to other services like [Cloud Run](https://cloud.google.com/run): ``` gcloud run deploy --image=$(ko publish ./cmd/app) ``` +* Note: The image must be pushed to [Google Container Registry](https://cloud.google.com/container-registry) or [Artifact Registry](https://cloud.google.com/artifact-registry). + +Or [fly.io](https://fly.io): + +``` +flyctl launch --image=$(ko publish ./cmd/app) +``` + +* Note: The image must be publicly available. + +Or [AWS Lambda](https://aws.amazon.com/lambda/): + +``` +aws lambda update-function-code \ + --function-name=my-function-name \ + --image-uri=$(ko publish ./cmd/app) +``` + +* Note: The image must be pushed to [ECR](https://aws.amazon.com/ecr/), based on the AWS provided base image, and use the [`aws-lambda-go`](https://github.com/aws/aws-lambda-go) framework. +See [official docs](https://docs.aws.amazon.com/lambda/latest/dg/go-image.html) for more information. + ## Configuration Aside from `KO_DOCKER_REPO`, you can configure `ko`'s behavior using a