Bitnami Docker Image for TensorFlow Serving
Switch branches/tags
1.11.0-ol-7-r13 1.11.0-ol-7-r12 1.11.0-ol-7-r11 1.11.0-ol-7-r10 1.11.0-ol-7-r9 1.11.0-ol-7-r8 1.11.0-ol-7-r7 1.11.0-ol-7-r6 1.11.0-ol-7-r5 1.11.0-ol-7-r4 1.11.0-ol-7-r3 1.11.0-ol-7-r2 1.11.0-ol-7-r1 1.11.0-ol-7-r0 1.11.0-debian-9-r17 1.11.0-debian-9-r16 1.11.0-debian-9-r15 1.11.0-debian-9-r14 1.11.0-debian-9-r13 1.11.0-debian-9-r12 1.11.0-debian-9-r11 1.11.0-debian-9-r10 1.11.0-debian-9-r9 1.11.0-debian-9-r8 1.11.0-debian-9-r7 1.11.0-debian-9-r6 1.11.0-debian-9-r5 1.11.0-debian-9-r4 1.11.0-debian-9-r3 1.11.0-debian-9-r2 1.11.0-debian-9-r1 1.11.0-debian-9-r0 1.10.1-ol-7-r7 1.10.1-ol-7-r6 1.10.1-ol-7-r5 1.10.1-ol-7-r4 1.10.1-ol-7-r3 1.10.1-ol-7-r2 1.10.1-ol-7-r1 1.10.1-ol-7-r0 1.10.1-debian-9-r36 1.10.1-debian-9-r35 1.10.1-debian-9-r34 1.10.1-debian-9-r33 1.10.1-debian-9-r32 1.10.1-debian-9-r31 1.10.1-debian-9-r30 1.10.1-debian-9-r29 1.10.1-debian-9-r28 1.10.1-debian-9-r27 1.10.1-debian-9-r26 1.10.1-debian-9-r25 1.10.1-debian-9-r24 1.10.1-debian-9-r23 1.10.1-debian-9-r22 1.10.1-debian-9-r21 1.10.1-debian-9-r20 1.10.1-debian-9-r19 1.10.1-debian-9-r18 1.10.1-debian-9-r17 1.10.1-debian-9-r16 1.10.1-debian-9-r15 1.10.1-debian-9-r14 1.10.1-debian-9-r13 1.10.1-debian-9-r12 1.10.1-debian-9-r11 1.10.1-debian-9-r10 1.10.1-debian-9-r9 1.10.1-debian-9-r8 1.10.1-debian-9-r7 1.10.1-debian-9-r6 1.10.1-debian-9-r5 1.10.1-debian-9-r4 1.10.1-debian-9-r3 1.10.1-debian-9-r2 1.10.1-debian-9-r1 1.10.1-debian-9-r0 1.9.1-ol-7-r14 1.9.1-ol-7-r13 1.9.1-ol-7-r12 1.9.1-ol-7-r11 1.9.1-ol-7-r10 1.9.1-ol-7-r9 1.9.1-ol-7-r8 1.9.1-ol-7-r7 1.9.1-ol-7-r6 1.9.1-ol-7-r5 1.9.1-ol-7-r4 1.9.1-ol-7-r3 1.9.1-ol-7-r2 1.9.1-ol-7-r1 1.9.1-ol-7-r0 1.9.1-debian-9-r13 1.9.1-debian-9-r12 1.9.1-debian-9-r11 1.9.1-debian-9-r10 1.9.1-debian-9-r9 1.9.1-debian-9-r8 1.9.1-debian-9-r7 1.9.1-debian-9-r6
Nothing to show
Clone or download


What is Tensorflow Serving?

TensorFlow Serving is a flexible, high-performance serving system for machine learning models, designed for production environments. TensorFlow Serving makes it easy to deploy new algorithms and experiments, while keeping the same server architecture and APIs. TensorFlow Serving provides out-of-the-box integration with TensorFlow models, but can be easily extended to serve other types of models and data.

With the Bitnami Docker TensorFlow Serving image it is easy to server models like inception or MNIST. For a functional example you can check the TensorFlow Inception repository.

NOTE: This image needs access to trained data to actually works. Please check bitnami-docker-tensorflow-inception repository or follow the steps provided here


$ docker run --name tensorflow-serving bitnami/tensorflow-serving:latest

Docker Compose

$ curl -sSL > docker-compose.yml
$ docker-compose up -d

Why use Bitnami Images?

  • Bitnami closely tracks upstream source changes and promptly publishes new versions of this image using our automated systems.
  • With Bitnami images the latest bug fixes and features are available as soon as possible.
  • Bitnami containers, virtual machines and cloud images use the same components and configuration approach - making it easy to switch between formats based on your project needs.
  • Bitnami images are built on CircleCI and automatically pushed to the Docker Hub.
  • All our images are based on minideb a minimalist Debian based container image which gives you a small base container image and the familiarity of a leading linux distribution.
  • Bitnami container images are released daily with the latest distribution packages available.

Anchore Image Overview

The image overview badge contains a security report with all open CVEs. Click on 'Show only CVEs with fixes' to get the list of actionable security issues.

Supported tags and respective Dockerfile links

NOTE: Debian 8 images have been deprecated in favor of Debian 9 images. Bitnami will not longer publish new Docker images based on Debian 8.

Learn more about the Bitnami tagging policy and the difference between rolling tags and immutable tags in our documentation page.

Subscribe to project updates by watching the bitnami/tensorflow-serving GitHub repo.

Get this image

The recommended way to get the Bitnami TensorFlow Serving Docker Image is to pull the prebuilt image from the Docker Hub Registry.

$ docker pull bitnami/tensorflow-serving:latest

To use a specific version, you can pull a versioned tag. You can view the list of available versions in the Docker Hub Registry.

$ docker pull bitnami/tensorflow-serving:[TAG]

If you wish, you can also build the image yourself.

$ docker build -t bitnami/tensorflow-serving:latest

Persisting your configuration

If you remove the container all your data and configurations will be lost, and the next time you run the image the data and configurations will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.

For persistence you should mount a volume at the /bitnami path for the TensorFlow Serving data and configurations. If the mounted directory is empty, it will be initialized on the first run.

$ docker run -v /path/to/tensorflow-serving-persistence:/bitnami bitnami/tensorflow-serving:latest

or using Docker Compose:

version: '2'

    image: 'bitnami/tensorflow-serving:latest'
      - '8500:8500'
      - /path/to/tensorflow-serving-persistence:/bitnami

Connecting to other containers

Using Docker container networking, a TensorFlow Serving server running inside a container can easily be accessed by your application containers.

Containers attached to the same network can communicate with each other using the container name as the hostname.

Using the Command Line

In this example, we will create a TensorFlow Inception client instance that will connect to the server instance that is running on the same docker network as the client. The Inception client will export an already trained data so the server can read it and you will be able to query the server with an image to get it categorized.

Step 1: Download the Inception trained data

$ mkdir /tmp/model-data
$ curl -o '/tmp/model-data/inception-v3-2016-03-01.tar.gz' ''
$ cd /tmp/model-data
$ tar xzf inception-v3-2016-03-01.tar.gz

Step 2: Create a network

$ docker network create app-tier --driver bridge

Step 3: Launch the TensorFlow Serving server instance

Use the --network app-tier argument to the docker run command to attach the TensorFlow Serving container to the app-tier network.

$ docker run -d --name tensorflow-serving \
    --volume /tmp/model-data:/bitnami/model-data
    --network app-tier \

Step 4: Launch your TensorFlow Inception client instance

Finally we create a new container instance to launch the TensorFlow Serving client and connect to the server created in the previous step:

$ docker run -it --rm \
    --volume /tmp/model-data:/bitnami/model-data
    --network app-tier \
    bitnami/tensorflow-inception:latest inception_client --server=tensorflow-serving:8500 --image=path/to/image.jpg

Using Docker Compose

When not specified, Docker Compose automatically sets up a new network and attaches all deployed services to that network. However, we will explicitly define a new bridge network named app-tier. In this example we assume that you want to connect to the TensorFlow Serving server from your own custom application image which is identified in the following snippet by the service name myapp.

version: '2'

    driver: bridge

    image: 'bitnami/tensorflow-serving:latest'
      - app-tier
      - app-tier


  1. Please update the YOUR_APPLICATION_IMAGE_ placeholder in the above snippet with your application image
  2. In your application container, use the hostname tensorflow-serving to connect to the TensorFlow Serving server

Launch the containers using:

$ docker-compose up -d


Configuration file

The image looks for configurations in /bitnami/tensorflow-serving/conf/. As mentioned in Persisting your configuation you can mount a volume at /bitnami and copy/edit the configurations in the /path/to/tensorflow-serving-persistence/tensorflow-serving/conf/. The default configurations will be populated to the conf/ directory if it's empty.

Step 1: Run the TensorFlow Serving image

Run the TensorFlow Serving image, mounting a directory from your host.

$ docker run --name tensorflow-serving -v /path/to/tensorflow-serving-persistence:/bitnami bitnami/tensorflow-serving:latest

or using Docker Compose:

version: '2'

    image: 'bitnami/tensorflow-serving:latest'
      - '8500:8500'
      - '8501:8501'
      - /path/to/tensorflow-serving-persistence:/bitnami

Step 2: Edit the configuration

Edit the configuration on your host using your favorite editor.

$ vi /path/to/tensorflow-serving-persistence/conf/tensorflow-serving.conf

Step 3: Restart TensorFlow Serving

After changing the configuration, restart your TensorFlow Serving container for changes to take effect.

$ docker restart tensorflow-serving

or using Docker Compose:

$ docker-compose restart tensorflow-serving


The Bitnami TensorFlow Serving Docker image sends the container logs to the stdout. To view the logs:

$ docker logs tensorflow-serving

or using Docker Compose:

$ docker-compose logs tensorflow-serving

The logs are also stored inside the container in the /opt/bitnami/tensorflow-serving/logs/tensorflow-serving.log file.

You can configure the containers logging driver using the --log-driver option if you wish to consume the container logs differently. In the default configuration docker uses the json-file driver.


Upgrade this image

Bitnami provides up-to-date versions of TensorFlow Serving, including security patches, soon after they are made upstream. We recommend that you follow these steps to upgrade your container.

Step 1: Get the updated image

$ docker pull bitnami/tensorflow-serving:latest

or if you're using Docker Compose, update the value of the image property to bitnami/tensorflow-serving:latest.

Step 2: Stop and backup the currently running container

Stop the currently running container using the command

$ docker stop tensorflow-serving

or using Docker Compose:

$ docker-compose stop tensorflow-serving

Next, take a snapshot of the persistent volume /path/to/tensorflow-serving-persistence using:

$ rsync -a /path/to/tensorflow-serving-persistence /path/to/tensorflow-serving-persistence.bkp.$(date +%Y%m%d-%H.%M.%S)

You can use this snapshot to restore the database state should the upgrade fail.

Step 3: Remove the currently running container

$ docker rm -v tensorflow-serving

or using Docker Compose:

$ docker-compose rm -v tensorflow-serving

Step 4: Run the new image

Re-create your container from the new image, restoring your backup if necessary.

$ docker run --name tensorflow-serving bitnami/tensorflow-serving:latest

or using Docker Compose:

$ docker-compose start tensorflow-serving

Notable Changes

1.8.0-r12, 1.8.0-debian-9-r1, 1.8.0-ol-7-r11

  • The default serving port has changed from 9000 to 8500.


We'd love for you to contribute to this container. You can request new features by creating an issue, or submit a pull request with your contribution.


If you encountered a problem running this container, you can file an issue. For us to provide better support, be sure to include the following information in your issue:

  • Host OS and version
  • Docker version (docker version)
  • Output of docker info
  • Version of this container (echo $BITNAMI_IMAGE_VERSION inside the container)
  • The command you used to run the container, and any relevant output you saw (masking any sensitive information)


Copyright 2018 Bitnami

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.