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 ...
Get OpenShift for Developers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.