DevOps with Github, Docker Hub and Oracle Container Cloud Services

  1. Comprehensive Blog on Dockers running on OCI
  2. running a Docker Container on OCI
  3. opening OCI Ports for Docker Containers
  4. Building a Docker Image by using Dockerfile
  5. Committing changes made in a Docker without using Dockerfile
  6. Pushing Docker Images to Docker Hub
  7. DevOps with Github, Docker Hub and Oracle Container Cloud Services

We will create a Docker image running on Public IP which gets deployed on Oracle Container Cloud Services, the docker sources will be available in Github and Build process will be managed by Docker Hub

To do this you would need the following

Connect Docker Hub with Git Repo

Login to , Select the dropdown of your profile name at extreme right, click on Settings, click on Linked Accounts and Services, Link with Github

Link with Github, this might ask for github login if you are already not logged into github


Fork Repo into your Github

Login to your GitHub account at , ii. Go to application repository at docker-hello-world Click on Fork button at the top of the repository page

Automated Builds

Access Docker Hub, Select Create Automated Builds, click on Create Auto-builds from Github

this should show docker-images , click on that

select Repository name , name for the build and also description , select public option and then create button

You can now view the Repository info

click on build settings, for the Master give Docker file as “/ContainerCloud/images/docker-hello-world/” , Docker tag name as latest

Save changes.

You can now Trigger a build 

the Repository Info will now be updated , please copy the docker file name in this case it is jamessmith73/docker-images_madhus_world

View Docker file info

Login to Oracle Container Cloud Service

Select Services , from the left navigation and click on New Service Button

Image name should match the one with docker hub image that we created,  jamessmith73/docker-images_madhus_world

Check the Ports option, select Host Port as 8080 and Container Port as 80

Click on Save,

Deploy the Service

Select Resource Pool as Production or Default , now we should be able to see Public IP , the docker should be accessable at http://public ip:8080

Changing the Docker content at Github

Edit the index.html file in our repo save changes by commiting

Trigger the build , now the new version of content should be visible at public ip address

Author Madhusudhan Rao