I’m running up some environments for the Developer Experience workshop. And looking to use docker to host some of the environments. Here’s a quick snapshot for getting yourself up and running.
LET’S GET AN ORACLE COMPUTE INSTANCE PROVISIONED
So, after you have got your environment from https://cloud.oracle.com/tryit and you have logged into the Oracle Compute Cloud Service, you’ll find yourself here at the landing page. From here we’ll create our compute instance.
- Click on the Create Instance button.
- Select an OL image. There are some basic requirements for docker. You will need to select an image with UEKR4. I selected OL_6.8_UEKR4_x86_64. Once you have selected it, then click on the arrow. NB: Don’t click on Review And Create, this will take you the end with the default. We DON’T want that yet.
- Select the compute size that you want. Depending on the number of containers and the performance you want, select the type that is most appropriate. Once you have selected it, then click on the arrow.
- Enter is the name and label of the compute instance. Also add the public key for your SSH key which will be used so you can SSH into the instance. Once you have entered the details, then click on the arrow.
- You now have the option to update the network configuration. Create a new security list which will be the default network access.
- Now it’s time to configure the storage. The default storage is typically not enough. What I’ve done here is to replace the existing storage with a volume that is better to host the images.
- Create a new Storage Volume with sufficient disk. NB: Make sure you configure the storage as your boot drive and the first attached drive. I would also suggest that you select the storage/protocol/iscsi storage property for the disk. Once you have entered the details, then click on the arrow.
- Review the details and then click Create.
- After that has been done, then a set of orchestrations will be created and run. After a little while, the instance will be operation.
- If you go back to the Instances tab, then you will see your newly provisioned IaaS compute instance.
LET’S GET DOCKER PROVISIONED
The docker installation process is pretty easy. There’s great documentation on the docker site. Refer to https://docs.docker.com/engine/installation/linux/oracle. Most of the information that you need is there.
Here’s a couple of the main steps to the installation process.
- Update the yum repository configuration to include the docker repository. NB: Choose the right OL6 or OL7 repository.
- After the installation, run up the hello-world docker image. This will also make sure you can access the docker registry which is a great place to get pre-defined available images.
- Create a new user (which is not opc or root) to run docker. I’ve added an oracle user and provided the user the privileges to manage docker. And as you can see I’m know running docker as the oracle user.
- If you want more ways to configure docker, see the docker documentation. Refer to https://docs.docker.com/engine/installation/linux/linux-postinstall.
And here you are, docker installed. There are some other things that you might want to consider.
- Later on, one of the typical things that you do is modify the network security so you can access what the docker instance is hosting like WebLogic Server.
- Import and create your docker images.
- Run up a swarm of docker instances.
What you’ve got here is similar to Oracle Container Cloud Service. However, if you are invested in docker and want the full control over the swarm, management and the underlying images, then this may be your preferred method.