O'Reilly logo

OpenShift for Developers by Graham Dumpleton, Grant Shipley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Deploying an Existing Docker Image

In the previous chapters we learned some key features of the OpenShift container application platform including the powerful source-to-image feature. If you recall, the S2I feature allows you to interact with the platform from a pure source code perspective. While this is awesome, there may be occasions when you want to deploy an existing Docker image to the platform. You will be happy to know that OpenShift supports this common request. After all, what good is a container platform if doesn’t support the running of containers that have already been built? In this chapter we are going to deploy a Docker image from the public Docker Hub.

What Is Docker Hub?

If you are not familiar with Docker-based containers, chances are you haven’t heard about Docker Hub before. Don’t worry, it is a pretty simple concept to understand. However, to understand the need for Docker Hub, you first need to understand how a Docker image is actually built.

Unless they are using OpenShift, most developers don’t have the luxury of a S2I project that automatically creates Docker images on the fly based on their source code. What this means is that when using plain Docker, a developer has to do a couple of things, namely create Dockerfiles and perform builds.

The Dockerfile

A Dockerfile is a text document that defines how an image should be created. Depending on the complexity of the application, the Dockerfile can quickly become verbose and unwieldy. As an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required