Now we want to containerize the Gochat app. If you are using the CLI on your own computer, you could use the docker command. However, if you are in the Wetty terminal, remember you are actually in a container. We could have exposed the container socket on the host to your Wetty container. However, this would break the security model.
Fortunately we can build from a Dockerfile using the oc command line tool. For those on your own computer, we recommend trying it this way as well.
Create a new project for your containerized gochat application.
oc new-project gochat-container-$OCP_USER
Start a new build from the Dockerfile in the gochat-container repository.
oc new-build https://github.com/kevensen/gochat-client-container -e CHAT_SERVER=gochat-server.gochat-server.svc.cluster.local:8080
Watch the deployment
oc logs -f bc/gochat-client-container
Then ctrl-c once you've had enough.
oc new-app gochat-client-container
oc expose svc gochat-client-container
Go back to the OpenShift WebUI and click on the "gochat" URL.
Log in to the app with your OpenShift token.
Send a message.