Skip to content

Instantly share code, notes, and snippets.

@arttuladhar
Last active October 8, 2019 04:53
Show Gist options
  • Save arttuladhar/779036e4b2f253629468999c4ad6d3a1 to your computer and use it in GitHub Desktop.
Save arttuladhar/779036e4b2f253629468999c4ad6d3a1 to your computer and use it in GitHub Desktop.

Demo 1 - Building nginx WebServer

oc login -u developer -p any
oc new-project demo1
oc new-app --name=nginx --docker-image=bitnami/nginx
oc status
oc get pods
oc describe pod <podname>
oc get svc
oc describe service nginx
oc port-forward <podname> 4040:8080
curl -s http://localhost:4040

Demo 2 - Building MySQL

oc new-app --docker-image=mysql:latest \
  --name=mysql-ocp -e MYSQL_USER=user -e MYSQL_PASSWORD=password \
  -e MYSQL_DATABASE=mydb -e MYSQL_ROOT_PASSWORD=password
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment