Lab 9.7 - Manage images with The Source-to-Image (S2I)

1. Install docker

yum install -y yum-utils
yum-config-manager \
    --add-repo \
yum install docker-ce docker-ce-cli -y

systemctl start docker
systemctl enable docker
systemctl status docker

2. Install the S2I tool

curl -s \
  | grep browser_download_url \
  | grep linux-amd64 \
  | cut -d '"' -f 4 \
  | wget -qi -

tar xvf source-to-image*.gz
mv s2i /usr/local/bin

3. Build an image

s2i build \
 centos/nginx-112-centos7 \

4. Build an application with S2I tool

oc new-app centos/nginx-112-centos7~
oc get pods

5. Verify the builds

oc get build

6. Make the service accessible by creating a route to it

oc expose svc/nginx-helloworld

7. List the routes to view the host/port

oc get routes

8. Try to access the application from the laptop by the URL