Docker, GitHub, oracle cloud

Oracle Container Cloud Service: A simple deploy lab

Dag!
Today I’ll show you how to deploy applications using the Oracle Container Cloud Service.

Before you start:

You’ll need a GitHub account, a Docker Hub account and of course, a subscription to the Oracle Cloud Services.

PART I: Link your GitHub and you Docker account

Go to https://hub.docker.com/login and click on your user name and click on settings

Click on Linked Accounts & Services:

Click on Link GitHub:

I’d recommend you select this option here:

Sign in and authorize Docker.

Done? You might see something like this:

Now, fork the app Repo In Git Hub:

Login on GitHub, my friend: https://github.com/login

Navigate to this Repo here: https://github.com/oracle/docker-images/tree/master/ContainerCloud/images/docker-hello-world

Click on Fork:

Now you have a copy of this repo. 😉

Now, login again on Docker. Click on Create menu and select Create Automated Build.

Click on the GitHub option

Select your docker-images:

And create.

Open Build settings and change from ” / ” to ” /ContainerCloud/images/docker-hello-world/ “. Save the changes.

Click on Trigger.

Navigate to the Build Details page, where you can see the build that just you triggered. Because of the build settings you specified, the image will be built using the master GitHub branch and will be given the tag latest in Docker Hub.

Go to Repo info:

PART II: Create new service with the Oracle container cloud service:

log in on https://myservices.emea.oraclecloud.com and go to your container cloud service menu.

If you never created one, probably this is the page that you will see. Don’t be shy! create a service!

On this post I’m not detailing how to manage the Oracle Container Cloud Service Dashboard and tools. I recommend you to check here: https://cloud.oracle.com/en_US/container/documentation

After login on your new created service, just click on Services:

Click on “New Service” button.

Important thing on the service editor screen:

Service Name: MorettaLab
Image: mmorettoni/docker-images:latest
Ports:8080 and 80 using TCP (Please select the option “Ports” on the right panel)

Save it! Can you see your service now? Click on Deploy.

This is the Dialog box before you deploy your app. I’m using the defaul settings. Click on deploy again.

Follow the Build:

Voilà! Click on the “RUNNING” button!

Check the details:

You can also click on the Hostname:

Now the best part. What if we verify our deployment? Get the Public IP from the host page:

http://<public IP>:8080/

Done! Prost!

 

Leave a comment