Git Product home page Git Product logo

ociproxy's Introduction

An OCI Registry Proxy

This point of this tool is to allow you to easily and cheaply define you own custom domain name for your OCI images. (These are also known a Docker images). By doing so, where your OCI images physically live is no longer tied to name of your image. This allows you to move the location where your image is hosted without breaking everyone who uses your image.

A longer term goal of this project is enable you to easily mirror your container registry to different clouds. This will give consumers of your images a faster download experience while also saving you money on cloud egress charges.

Configuration

Set the UpstreamRegistry environmental variable to the URL of your upstream registry.

For example, let's say you set UpstreamRegistry to https://us-central1-docker.pkg.dev/v2/oci-proxy/oci-proxy-images/ and you are running this proxy program on images.happy-turtle.dev. When someone pulls the images.happy-turtle.dev/oci-proxy:1.0.0 image, this program will redirect them to actually pull us-central1-docker.pkg.dev/oci-proxy/oci-proxy-images/oci-proxy:1.0.0.

Note that UpstreamRegistry contains the registry URL, not an image name. Specifically note the /v2/ path component in the registry URL, which does not appear in the image name.

TODO

  • Figure out a versioning strategy for our OCI image. Currently the build script always pushes version 1.0.0.
  • Put something more interesting on the index page.
  • Maybe parse the requests more carefully before forwarding to the upstream. Currently this program blindly forwards any request.

Not for MVP, but eventually this would be nice:

  • Add support for redirecting to object storage based on source IP.
  • Add a program that copies blobs to object storage for the above feature. This could run:
    • On some sort of schedule.
    • Automatically based on Pub-Sub notifications when a new image is pushed.
  • Maybe add some sort of analytics that can automatically mirror images to new cloud regions based on access patterns.

Developer Docs

Test Command:

docker pull images.happy-turtle.dev/oci-proxy:1.0.0

ociproxy's People

Contributors

austinwise avatar dependabot[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.