
An image contains the code used to create a deployment.The deployment YAML configuration file will specify the number of replicas which is the number of pods that should be created for the deployment.
If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.
The oc get images command will list the images.The image reference column will list the online repository that contains the image, such as registry.redhat.io or hub.docker.com, followed by the SHA256 digest of the image. In this example, the image for version 118 of NGINX for Red Hat Enterprise Linux 8 (rhel8) is listed.
~]# oc get images
NAME IMAGE REFERENCE
sha256:b0c3c1535819ebbc8fe00b79cd74d88702d1bd74a5348a30b2fa849a637ecac6 registry.redhat.io/rhel8/nginx-118@sha256:b0c3c1535819ebbc8fe00b79cd74d88702d1bd74a5348a30b2fa849a637ecac6
The same SHA256 digest for version 118 of the NGINX image can be seen at https://catalog.redhat.com, which lists the images stored in the registry.redhat.io online repository.
The oc describe image command can be used to display more information about an image.
~]# oc describe image sha256:0089883f8e4387618946cd24378a447b8cf7e5dfaa146b94acab27fc5e170a14
Docker Image: registry.redhat.io/jboss-webserver-3/webserver31-tomcat7-openshift@sha256:19b41b58dd04cff1fee28176781bf3243fc140d54a0a0f010843a5fc61557536
Name: sha256:19b41b58dd04cff1fee28176781bf3243fc140d54a0a0f010843a5fc61557536
Created: 13 months ago
Annotations: image.openshift.io/dockerLayersOrder=ascending
Image Size: 195.9MB in 6 layers
Layers: 74.87MB sha256:26e5ed6899dbf4b1e93e0898255e8aaf43465cecd3a24910f26edb5d43dafa3c
1.238kB sha256:66dbe984a319ca6d40dc10c2c561821128a0bd8967e0cbd8cc2a302736041ffb
3.639MB sha256:78f9ea175a0a36eeccd5399d82c03146149c4d6ad6afa134cb314c7d3be7dab9
70.07MB sha256:39fe8b1d3a9cb13a361204c23cf4e342d53184b4440492fa724f4aeb4eb1d64f
12.97MB sha256:9a6c965879c0d9c02d9fbcf8d55930a40b7ca790ad568755d4f6060809d004aa
34.38MB sha256:f1c49b6f75bca53ff3885a83e79cfd6521979158d2f2993243e09a4aa6019a05
Image Created: 4 years ago
Author: <none>
Arch: amd64
Command: /opt/webserver/bin/launch.sh
Working Dir: /home/jboss
User: 185
Exposes Ports: 8080/tcp, 8443/tcp, 8778/tcp
Docker Labels: architecture=x86_64
authoritative-source-url=registry.access.redhat.com
build-date=2017-10-23T14:39:59.620549
com.redhat.build-host=rcm-img-docker02.build.eng.bos.redhat.com
com.redhat.component=jboss-webserver-3-webserver31-tomcat7-openshift-docker
com.redhat.deployments-dir=/opt/webserver/webapps
com.redhat.dev-mode=DEBUG:true
com.redhat.dev-mode.port=JPDA_ADDRESS:8000
description=Platform for building and running web applications on JBoss Web Server 3.1 - Tomcat v7
distribution-scope=public
io.k8s.description=Platform for building and running web applications on JBoss Web Server 3.1 - Tomcat v7
io.k8s.display-name=JBoss Web Server 3.1
io.openshift.expose-services=8080:http
io.openshift.s2i.scripts-url=image:///usr/local/s2i
io.openshift.tags=builder,java,tomcat7
maintainer=Cloud Enablement Feedback <cloud-enablement-feedback@redhat.com>
name=jboss-webserver-3/webserver31-tomcat7-openshift
org.jboss.deployments-dir=/opt/webserver/webapps
release=12
summary=Red Hat JBoss Web Server 3.1 Tomcat 7 container image
url=https://access.redhat.com/containers/#/registry.access.redhat.com/jboss-webserver-3/webserver31-tomcat7-openshift/images/1.0-12
vcs-ref=2a22ef4bf95ebeaa881da765f81a329146b77e08
vcs-type=git
vendor=Red Hat, Inc.
version=1.0
Environment: PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
container=oci
JBOSS_IMAGE_NAME=jboss-webserver-3/webserver31-tomcat7-openshift
JBOSS_IMAGE_VERSION=1.0
HOME=/home/jboss
JAVA_TOOL_OPTIONS=-Duser.home=/home/jboss -Duser.name=jboss
JAVA_HOME=/usr/lib/jvm/java-1.8.0
JAVA_VENDOR=openjdk
JAVA_VERSION=1.8.0
JBOSS_PRODUCT=webserver
JBOSS_WEBSERVER_VERSION=3.1.1
PRODUCT_VERSION=3.1.1
TOMCAT_VERSION=7.0.70
JWS_HOME=/opt/webserver
CATALINA_OPTS=-Djava.security.egd=file:/dev/./urandom
JPDA_ADDRESS=8000
STI_BUILDER=jee
AB_JOLOKIA_PASSWORD_RANDOM=true
AB_JOLOKIA_AUTH_OPENSHIFT=true
AB_JOLOKIA_HTTPS=true
Or, the oc get image command with the --output json or --output yaml option can be used.
oc get image sha256:19b41b58dd04cff1fee28176781bf3243fc140d54a0a0f010843a5fc61557536 --output yaml
Did you find this article helpful?
If so, consider buying me a coffee over at