Oracle Cloud Infrastructure Documentation

10. Log in to Oracle Cloud Infrastructure Registry

Before using Oracle Functions, you have to log Docker in to the Docker registry in which you are going to store your functions as Docker images. This is the Docker registry specified in the Fn Project CLI context (see 6. Create an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure).

You can store functions in public and private repositories in Oracle Cloud Infrastructure Registry, an Oracle-managed registry built on top of Oracle Cloud Infrastructure.

When you log Docker into a Docker registry, you have to provide the appropriate authentication details. For example, in the case of Oracle Cloud Infrastructure Registry, you have to provide the tenancy Object Storage namespace, the user name, and the user's auth token.

The instructions in this topic assume you have already completed the steps in 9. Start Docker.

To log Docker into Oracle Cloud Infrastructure Registry:

  1. Log in to your development environment as a functions developer.

  2. In a terminal window, log in to Oracle Cloud Infrastructure Registry by entering:

    $ docker login <region-code>.ocir.io

    where <region-code> is the code for the Oracle Cloud Infrastructure Registry region specified in the Fn Project CLI context (see 6. Create an Fn Project CLI Context to Connect to Oracle Cloud Infrastructure). For example, phx for Phoenix. See Availability by Region Name and Region Code for the list of region codes.

    For example:

    $ docker login phx.ocir.io
  3. When prompted for Username, enter the name of the user you will be using with Oracle Functions to create and deploy functions, in the format:

    <tenancy-namespace>/<username>

    where <tenancy-namespace> is the auto-generated Object Storage namespace string of the tenancy in which to create repositories (as shown on the Tenancy Information page). For example, ansh81vru1zp/jdoe@acme.com.

    Note that for some older tenancies, the namespace string might be the same as the tenancy name in all lower-case letters (for example, acme-dev).

    If your tenancy is federated with Oracle Identity Cloud Service, use the format <tenancy-namespace>/oracleidentitycloudservice/<username>.

    You must have already generated an Oracle Cloud Infrastructure auth token for the user you specify (see 8. Generate an Auth Token to Enable Login to Oracle Cloud Infrastructure Registry).

  4. When prompted for Password, enter the user's Oracle Cloud Infrastructure auth token. Having entered the password, Docker might warn you that the password is stored unencrypted in the Docker configuration file. The warning includes a link to the Docker documentation where you can find out how to configure a credential helper. Oracle recommends you review the information in the Docker documentation and consider using an external credentials store for increased security.

When you have completed the steps in this topic, you have completed the configuration tasks for your client environment. Go on to Verifying Your Configuration for Function Development to confirm that the Fn Project CLI can communicate with the API endpoint.