Back to the main page

OCI Docker Registry [OCIR] service

Intro

OCI Registry is an Oracle-managed docker registry. OCIR can be:

Auth Token

A user needs the Auth Token in order to push images to the Registriy's repository. To generate one:

Login to OCIR from Docker CLI

Before you attempt to push an image to repository, make sure you have access right. Login using the command: docker login .ocir.io
In this example, our region is Ashburn, hence login to iad.ocir.io. Additionally username can be:

Repository

One of ways is to create it manually via OCI console: Solutions and Platform - Developer Services - Registry (OCIR) - Create Repository - Give repository name - decide on access (private or public).
Later, the access can be switched between private and public.

Push an image to OCIR repo

In this example, on your machine, first pull oraclelinux image from Docker Hub.
# docker pull oraclelinux
 
# docker images
REPOSITORY                   TAG                 IMAGE ID            CREATED             SIZE
oraclelinux                  latest              a803b2474b20        8 days ago          235MB

Tag an image

Give a tag to the image you plan to push to OCIR repo. The syntax is: docker tag <image-to-push> <region>.ocir.io/<tenancy>/<repo>/<image>:<tag>
Ex:
# docker tag oraclelinux iad.ocir.io/linuxtenancy/labops/ol:7.6
 
# docker images
REPOSITORY                               TAG                 IMAGE ID            CREATED             SIZE
oraclelinux                              latest              a803b2474b20        8 days ago          235MB
iad.ocir.io/linuxtenancy/labops/ol       7.6                 a803b2474b20        8 days ago          235MB

Push an image

Ex.
# docker push iad.ocir.io/linuxtenancy/labops/ol:7.6
 
The push refers to repository [iad.ocir.io/linuxtenancy/labops/ol]
52623949541e: Pushed

Pull an image from OCIR repo

Since this is the public repo, anyone should be able to pull an image from it.
Ex.
# docker pull iad.ocir.io/linuxtenancy/labops/ol:7.6
 
7.6: Pulling from linuxtenancy/labopsol
c93adbd5ca8c: Pull complete
Digest: sha256:8b72525bf36671bead1b0aba00ffc784c2ed7ba95962ecb565830cb22dd1a087
Status: Downloaded newer image for iad.ocir.io/linuxtenancy/labops/ol:7.6


Back to the main page