[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-09-03。"],[],[],null,["# Using Docker & Kubernetes\n\n| **Beta**\n|\n|\n| This feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nA\n[Docker image](https://github.com/google/aistreamer/blob/master/ingestion/env/Dockerfile)\nis provided for you to evaluate these features. You can download\nthis image as part of the\n[AIStreamer](https://github.com/google/aistreamer/tree/master/ingestion).\n\nPlease note that use of third-party software is solely at your\ndiscretion. Google does not own the copyright of third-party software.\n\nPrerequistes\n------------\n\n- Install [Docker](https://docs.docker.com/install).\n\n- Install [Google Cloud CLI](/sdk).\n\n- Install [Kubernetes](https://kubernetes.io/docs/tasks/tools/install-kubectl/#download-as-part-of-the-google-cloud-sdk).\n\nBuild Docker image\n------------------\n\nGo into the [ingestion directory](https://github.com/google/aistreamer/tree/master/ingestion)\nand run the following command line on your host machine: \n\n```bash\n$ export DOCKER_IMAGE=gcr.io/gcp-project-name/docker-image-name:version\n$ docker build -t $DOCKER_IMAGE -f env/Dockerfile .\n```\n\nTry Docker image on your local host\n-----------------------------------\n\nRun following command in the terminal for your host machine: \n\n```bash\n$ docker run -it $DOCKER_IMAGE /bin/bash\n```\n\nThe command returns a response similar to the following example. \n\n```transact-sql\nroot@e504724e76fc:/#\n```\n\nTo open another terminal connecting to Docker, run the following command on\nthe host machine: \n\n```bash\n$ docker exec -it e504724e76fc /bin/bash\n```\n\nNow, you have both host terminals that are in the same Docker container.\n\nDocker image environment setting\n--------------------------------\n\nSome environment settings can be customized in\nthe [Docker image](https://github.com/google/aistreamer/blob/master/ingestion/env/Dockerfile). \n\n```scdoc\n#set up environment for Google Video Intelligence Streaming API\nENV SRC_DIR /googlesrc #Source code directory\nENV BIN_DIR /google #Binary directory\n```\n\nPush Docker image to Google Cloud container registry\n----------------------------------------------------\n\nRun the following command in the terminal for your host machine: \n\n```bash\n$ gcloud docker --verbosity debug -- push $DOCKER_IMAGE\n```\n\nYou might need to set access control.\n\nDeploy to Google Cloud\n----------------------\n\nRun the following commands in the terminal for your host machine: \n\n```bash\n$ export KUBE_ID=any_string_you_like\n$ kubectl run -it $KUBE_ID --image=$DOCKER_IMAGE -- /bin/bash\n```\n\nThis returns a response similar to the following: \n\n```scdoc\nroot@$KUBE_ID-215855480-c4sqp:/#\n```\n\nTo open another terminal connecting to the same Kubernetes container on Google Cloud, run\nthe following command line on host machine: \n\n```bash\n$ kubectl exec -it $KUBE_ID-215855480-c4sqp -- /bin/bash\n```\n\nNow, you have both host terminals that are in the same Kubernetes container on\nGoogle Cloud."]]