Implementation:Tensorflow Serving Docker Push To Registry
Appearance
| Knowledge Sources | |
|---|---|
| Domains | Containerization, Cloud_Infrastructure |
| Last Updated | 2026-02-13 17:00 GMT |
Overview
Concrete tool for tagging and pushing a Docker serving image to Google Container Registry using docker and gcloud CLI commands.
Description
Three commands push the serving image to GCR:
- docker tag re-tags the local image with the GCR URL format (
gcr.io/{PROJECT_ID}/{IMAGE_NAME}) - gcloud auth configure-docker configures Docker to authenticate with GCR
- docker push uploads the image layers to the registry
Usage
Run after building the Docker image and before creating the Kubernetes deployment. Requires an authenticated GCP project with the Container Registry API enabled.
Code Reference
Source Location
- Repository: tensorflow/serving
- File: tensorflow_serving/g3doc/serving_kubernetes.md (L220-243)
Signature
docker tag $USER/resnet_serving gcr.io/tensorflow-serving/resnet
gcloud auth configure-docker
docker push gcr.io/tensorflow-serving/resnet
Import
# Requires: docker CLI, gcloud SDK
# GCP project with Container Registry API enabled
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| Source image | string | Yes | Local Docker image name (e.g., $USER/resnet_serving) |
| Target tag | string | Yes | Registry URL (e.g., gcr.io/project/image) |
| GCP credentials | auth | Yes | Authenticated gcloud session |
Outputs
| Name | Type | Description |
|---|---|---|
| Registry image | URL | Image available at gcr.io/{project}/{name} |
Usage Examples
Push to GCR
# Tag for GCR
docker tag $USER/resnet_serving gcr.io/my-project/resnet_serving
# Configure Docker auth for GCR
gcloud auth configure-docker
# Push
docker push gcr.io/my-project/resnet_serving
Alternative: Docker Hub
docker tag $USER/resnet_serving myuser/resnet_serving:latest
docker login
docker push myuser/resnet_serving:latest
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment