Using Docker & Kubernetes

A Docker image is provided for you to evaluate these features. You can download this image as part of the AIStreamer.

Please note that use of third-party software is solely at your discretion. Google does not own the copyright of third-party software.

Prerequistes

Build Docker image

Go into the ingestion directory and run the following command line on your host machine:

$exportDOCKER_IMAGE=gcr.io/gcp-project-name/docker-image-name:version
$dockerbuild-t$DOCKER_IMAGE-fenv/Dockerfile.

Try Docker image on your local host

Run following command in the terminal for your host machine:

$dockerrun-it$DOCKER_IMAGE/bin/bash

The command returns a response similar to the following example.

root@e504724e76fc:/#

To open another terminal connecting to Docker, run the following command on the host machine:

$dockerexec-ite504724e76fc/bin/bash

Now, you have both host terminals that are in the same Docker container.

Docker image environment setting

Some environment settings can be customized in the Docker image.

#set up environment for Google Video Intelligence Streaming API
ENV SRC_DIR /googlesrc #Source code directory
ENV BIN_DIR /google #Binary directory

Push Docker image to Google Cloud container registry

Run the following command in the terminal for your host machine:

$gclouddocker--verbositydebug--push$DOCKER_IMAGE

You might need to set access control.

Deploy to Google Cloud

Run the following commands in the terminal for your host machine:

$exportKUBE_ID=any_string_you_like
$kubectlrun-it$KUBE_ID--image=$DOCKER_IMAGE--/bin/bash

This returns a response similar to the following:

root@$KUBE_ID-215855480-c4sqp:/#

To open another terminal connecting to the same Kubernetes container on Google Cloud, run the following command line on host machine:

$kubectlexec-it$KUBE_ID-215855480-c4sqp--/bin/bash

Now, you have both host terminals that are in the same Kubernetes container on Google Cloud.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年11月06日 UTC.