├── tests ├── __init__.py ├── requirements.txt ├── urls.py ├── wsgi.py ├── README.md ├── test_conformance.py ├── settings.py └── test_api.py ├── docs ├── VERSION ├── assets │ ├── css │ │ └── extra.css │ ├── img │ │ ├── logo.png │ │ └── django-oci.png │ └── js │ │ ├── modernizr.74668098.js │ │ └── modernizr.1aa3b519.js ├── favicon.ico ├── conformance │ ├── index.html │ └── junit.xml ├── _includes │ ├── doc.html │ ├── alert.html │ ├── tags.html │ ├── google-analytics.html │ ├── headers.html │ ├── social.html │ ├── toc.html │ ├── scrolltop.html │ ├── editable.html │ ├── head.html │ ├── footer.html │ ├── sidebar.html │ └── navigation.html ├── _layouts │ ├── page.html │ ├── post.html │ └── default.html ├── pages │ ├── usage-agreement.md │ ├── sitemap.xml │ ├── about.md │ ├── archive.md │ ├── news.md │ └── feed.xml ├── _docs │ ├── storage │ │ └── index.md │ ├── getting-started │ │ ├── example.md │ │ ├── index.md │ │ ├── testing.md │ │ ├── options.md │ │ └── auth.md │ ├── faq.md │ ├── introduction.md │ └── design.md ├── CHANGELOG.md ├── _posts │ └── 2020-10-12-hello-world.md ├── Gemfile ├── _data │ └── toc.yml ├── search │ └── search_index.json ├── LICENSE ├── README.md ├── index.md └── _config.yml ├── .github ├── dev-requirements.txt ├── ISSUE_TEMPLATE.md ├── stale.yml ├── CONTRIBUTING.md └── workflows │ └── main.yml ├── requirements.txt ├── django_oci ├── __init__.py ├── views │ ├── __init__.py │ ├── base.py │ ├── parsers.py │ ├── auth.py │ └── image.py ├── admin.py ├── apps.py ├── signals.py ├── urls.py ├── files.py ├── settings.py ├── utils.py ├── auth.py ├── storage.py └── models.py ├── examples └── singularity │ ├── busybox_latest.sif │ └── config.json ├── MANIFEST.in ├── AUTHORS.md ├── pyproject.toml ├── setup.cfg ├── manage.py ├── runtests.sh ├── LICENSE ├── .gitignore ├── .pre-commit-config.yaml ├── CHANGELOG.md ├── README.md └── setup.py /tests/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/VERSION: -------------------------------------------------------------------------------- 1 | 0.0.1 2 | -------------------------------------------------------------------------------- /docs/assets/css/extra.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.github/dev-requirements.txt: -------------------------------------------------------------------------------- 1 | pre-commit 2 | black 3 | isort 4 | flake8 5 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsoch/django-oci/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | djangorestframework 2 | django-ratelimit==3.0.0 3 | pyjwt 4 | requests 5 | -------------------------------------------------------------------------------- /docs/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsoch/django-oci/HEAD/docs/assets/img/logo.png -------------------------------------------------------------------------------- /django_oci/__init__.py: -------------------------------------------------------------------------------- 1 | __version__ = "0.0.17" 2 | default_app_config = "django_oci.apps.DjangoOciConfig" 3 | -------------------------------------------------------------------------------- /docs/conformance/index.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsoch/django-oci/HEAD/docs/conformance/index.html -------------------------------------------------------------------------------- /docs/assets/img/django-oci.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsoch/django-oci/HEAD/docs/assets/img/django-oci.png -------------------------------------------------------------------------------- /tests/requirements.txt: -------------------------------------------------------------------------------- 1 | django 2 | djangorestframework 3 | django-ratelimit==3.0.0 4 | opencontainers 5 | requests 6 | pyjwt 7 | -------------------------------------------------------------------------------- /examples/singularity/busybox_latest.sif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vsoch/django-oci/HEAD/examples/singularity/busybox_latest.sif -------------------------------------------------------------------------------- /docs/_includes/doc.html: -------------------------------------------------------------------------------- 1 | {% if include.name %}{{ include.name }}{% else %}{{ include.path }}{% endif %} 2 | -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include README.md AUTHORS.md LICENSE 2 | 3 | graft django_oci 4 | 5 | global-exclude __pycache__ 6 | global-exclude *.py[co] 7 | global-exclude migrations 8 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Credits 2 | 3 | ## Development Lead 4 | 5 | * Vanessa Sochat 6 | 7 | ## Contributors 8 | 9 | None yet. Why not be the first? 10 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [tool.black] 2 | profile = "black" 3 | exclude = ["^env/"] 4 | 5 | [tool.isort] 6 | profile = "black" # needed for black/isort compatibility 7 | skip = [] 8 | -------------------------------------------------------------------------------- /setup.cfg: -------------------------------------------------------------------------------- 1 | [wheel] 2 | universal = 1 3 | 4 | [flake8] 5 | exclude = benchmarks docs 6 | max-line-length = 100 7 | ignore = E1 E2 E5 W5 8 | per-file-ignores = 9 | django_oci/views/__init__.py:F401 10 | -------------------------------------------------------------------------------- /docs/_includes/alert.html: -------------------------------------------------------------------------------- 1 |
2 |

{% if include.title %}{{ include.title }}{% else %}{{ include.type }}{% endif %}

3 |

{{ include.content }}

4 |
5 | -------------------------------------------------------------------------------- /docs/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 |
5 |
6 | {{ content }} 7 | {% include toc.html %} 8 | {% include editable.html %} 9 |
10 |
11 | -------------------------------------------------------------------------------- /django_oci/views/__init__.py: -------------------------------------------------------------------------------- 1 | # Load storage on application init 2 | from django_oci.storage import get_storage 3 | 4 | from .auth import GetAuthToken 5 | from .base import APIVersionCheck 6 | from .blobs import BlobDownload, BlobUpload 7 | from .image import ImageManifest, ImageTags 8 | 9 | storage = get_storage() 10 | -------------------------------------------------------------------------------- /docs/_includes/tags.html: -------------------------------------------------------------------------------- 1 | {% if site.tag_search_endpoint %}{% if page.tags %}{% endif %}{% endif %} 3 | -------------------------------------------------------------------------------- /tests/urls.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import absolute_import, unicode_literals 3 | 4 | from django.contrib import admin 5 | from django.urls import include, re_path 6 | 7 | urlpatterns = [ 8 | re_path(r"^admin/", admin.site.urls), 9 | re_path(r"^", include("django_oci.urls", namespace="django_oci")), 10 | ] 11 | -------------------------------------------------------------------------------- /docs/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 |

{{ page.title }}

6 | {% if page.badges %}{% for badge in page.badges %}{{ badge.tag }}{% endfor %}{% endif %} 7 | {{ page.date | date: "%B %d, %Y" }} 8 | {{ content }} 9 | -------------------------------------------------------------------------------- /docs/_includes/google-analytics.html: -------------------------------------------------------------------------------- 1 | {% if site.google-analytics %} 2 | {% endif %} 9 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | from __future__ import absolute_import, unicode_literals 4 | 5 | import os 6 | import sys 7 | 8 | if __name__ == "__main__": 9 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") 10 | from django.core.management import execute_from_command_line 11 | 12 | execute_from_command_line(sys.argv) 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | * django-oci version: 2 | * Django version: 3 | * Python version: 4 | * Operating System: 5 | 6 | ### Description 7 | 8 | Describe what you were trying to get done. 9 | Tell us what happened, what went wrong, and what you expected to happen. 10 | 11 | ### What I Did 12 | 13 | ``` 14 | Paste the command(s) you ran and the output. 15 | If there was a crash, please include the traceback here. 16 | ``` 17 | -------------------------------------------------------------------------------- /docs/pages/usage-agreement.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Policy 3 | permalink: /policy/ 4 | --- 5 | 6 | # Policy 7 | 8 | ## License 9 | 10 | Usage of Django-OCI is governed by the terms of the [license]({{ site.repo }}/blob/master/LICENSE), which you should read and agree to before using the software. We encourage developers that create registries 11 | to ensure that their registries are [GDPR Compliant](https://en.wikipedia.org/wiki/General_Data_Protection_Regulation). 12 | -------------------------------------------------------------------------------- /tests/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for example project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.settings") 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /docs/_docs/storage/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Storage" 3 | pdf: true 4 | toc: true 5 | --- 6 | 7 | # Storage Options 8 | 9 | Django-OCI aims to have several storage backends as options to store containers. 10 | Currently, we start with just Filesystem support. 11 | 12 | ## Filesystem 13 | 14 | Filesystem support is the default storage option, and is intended for smaller 15 | registries that cannot use a possibly external resource like the cloud. You 16 | don't need to change any settings to use filesystem storage, as it is the default. 17 | -------------------------------------------------------------------------------- /docs/pages/sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: null 3 | permalink: /sitemap.xml 4 | --- 5 | 6 | 7 | 8 | 9 | / 10 | {{ "now" | date: "%Y-%m-%d" }} 11 | daily 12 | 13 | {% for section in site.data.toc %} 14 | {{ site.baseurl }}{{ section.url }}/ 15 | {{ "now" | date: "%Y-%m-%d" }} 16 | daily 17 | 18 | {% endfor %} 19 | 20 | -------------------------------------------------------------------------------- /runtests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | function setup { 4 | python manage.py makemigrations django_oci 5 | python manage.py makemigrations 6 | python manage.py migrate 7 | python manage.py migrate django_oci 8 | } 9 | 10 | function cleanup { 11 | rm db-test.sqlite3 12 | } 13 | 14 | # Test the API with authentication 15 | setup 16 | python manage.py test tests.test_api 17 | cleanup 18 | 19 | # Test conformance without authentication 20 | setup 21 | DISABLE_AUTHENTICATION=yes python manage.py test tests.test_conformance 22 | cleanup 23 | 24 | # python manage.py test --noinput 25 | fuser -k 8000/tcp 26 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache Software License 2.0 3 | 4 | Copyright (c) 2020-2023, Vanessa Sochat 5 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); 7 | you may not use this file except in compliance with the License. 8 | You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, software 13 | distributed under the License is distributed on an "AS IS" BASIS, 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 | See the License for the specific language governing permissions and 16 | limitations under the License. 17 | -------------------------------------------------------------------------------- /docs/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | This is a manually generated log to track changes to the repository for each release. 4 | Each section should include general headers such as **Implemented enhancements** 5 | and **Merged pull requests**. All closed issued and bug fixes should be 6 | represented by the pull requests that fixed them. 7 | Critical items to know are: 8 | 9 | - renamed commands 10 | - deprecated / removed commands 11 | - changed defaults 12 | - backward incompatible changes 13 | - migration guidance 14 | - changed behaviour 15 | 16 | ## [master](https://github.com/vsoch/mkdocs-jekyll/tree/master) 17 | - getting search working (0.0.1) 18 | - start of theme (0.0.0) 19 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: wontfix 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.py[cod] 2 | __pycache__ 3 | 4 | # Django development 5 | env 6 | migrations 7 | images 8 | _site 9 | Gemfile.lock 10 | conformance.test 11 | 12 | # C extensions 13 | *.so 14 | 15 | # Packages 16 | *.egg 17 | *.egg-info 18 | dist 19 | build 20 | eggs 21 | parts 22 | bin 23 | var 24 | sdist 25 | develop-eggs 26 | .installed.cfg 27 | lib 28 | lib64 29 | 30 | # Installer logs 31 | pip-log.txt 32 | 33 | # Unit test / coverage reports 34 | .coverage 35 | .tox 36 | nosetests.xml 37 | htmlcov 38 | 39 | # Translations 40 | *.mo 41 | 42 | # Mr Developer 43 | .mr.developer.cfg 44 | .project 45 | .pydevproject 46 | 47 | # Pycharm/Intellij 48 | .idea 49 | 50 | # Complexity 51 | output/*.html 52 | output/*/index.html 53 | 54 | # Sphinx 55 | docs/_build 56 | -------------------------------------------------------------------------------- /docs/pages/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | permalink: /about/ 4 | --- 5 | 6 | # About 7 | 8 | Django-OCI is an opencontainers compliant registry for containers. 9 | To read more about it's background, see {% include doc.html name="the introduction" path="introduction" %}. 10 | For license and usage information, see [the policy page]({{ site.baseurl }}/policy). 11 | 12 | ## What infrastructure is needed? 13 | 14 | Django-OCI can be deployed locally on your system easily with virtual environments, or part of a container 15 | orchestrated registry. The tests and examples here are done with a Python virtual environment. 16 | 17 | ## Support 18 | 19 | If you need help, please don't hesitate to [open an issue](https://www.github.com/{{ site.github_repo }}/{{ site.github_user }}). 20 | -------------------------------------------------------------------------------- /docs/_includes/headers.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | repos: 2 | - repo: https://github.com/pre-commit/pre-commit-hooks 3 | rev: v4.3.0 4 | hooks: 5 | - id: check-added-large-files 6 | - id: check-case-conflict 7 | - id: check-docstring-first 8 | - id: end-of-file-fixer 9 | - id: trailing-whitespace 10 | - id: mixed-line-ending 11 | 12 | - repo: local 13 | hooks: 14 | - id: black 15 | name: black 16 | language: python 17 | types: [python] 18 | entry: black 19 | 20 | - id: isort 21 | name: isort 22 | args: [--filter-files] 23 | language: python 24 | types: [python] 25 | entry: isort 26 | 27 | - id: flake8 28 | name: flake8 29 | language: python 30 | types: [python] 31 | entry: flake8 32 | -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | {% include head.html %} 4 | 5 | 6 | {% include navigation.html %} 7 | 8 |
9 |
10 |
11 | {% include sidebar.html %} 12 |
13 | {{ content }} 14 |
15 |
16 |
17 |
18 | {% include footer.html %} 19 | {% include headers.html %} 20 | {% include tags.html %} 21 | {% include scrolltop.html %} 22 | {% include google-analytics.html %} 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/pages/archive.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: Articles 4 | permalink: /archive/ 5 | --- 6 | # News Archive 7 | 8 | {% for post in site.posts %}{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} 9 | 10 | {% if forloop.first %}

{{this_year}}

11 | {% else %}{% if this_year != next_year %} 15 | 16 |

{{next_year}}

17 |