summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2023-01-23 02:12:13 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2023-01-23 02:21:32 +0100
commitff1a9556032f4c10cb44e4438a414fb17102011b (patch)
tree3351d0ecc6e92d2980744816e5b29281f81254e7
parentd55df5af128e0b2a85a5fde09d3dcfc7412c8d5d (diff)
pcr: Add preliminary docker-registry 2.8.1 package
This package is based on the Guix docker-registry package that was made from scratch by me (and that is pending review). A basic configuration without authentication[1] was tested and works fine. [1] I took config-example.yml and removed the authentication part, and run it on localhost, and I managed to push a docker image to it. Note that at the moment it still lacks a systemd unit file and I also still need to investigate how to deploy it in production (so with authentication, a public domain, with TLS, etc) and to document that along the way on the Libreplanet Wiki[1]. [1]https://libreplanet.org/wiki/Group:Software/research/ExternalRepositories/DockerRegistries When that is done we could use it for different use cases, for instance: - For setting up an official Parabola docker registry for hosting Parabola official images. - For hosting an FSDG compliant docker registry for multiple FSDG compliant distributions. - For hosting FSDG compliant docker registries for other uses (like personal uses, specific use cases, etc) At the moment it's possible to build docker images for the following FSDG compliant distributions[1]: - Guix - Parabola - PureOS - Trisquel (9 and 10) [1]https://libreplanet.org/wiki/Group:Software/research/DistroExecutionEnvironments Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
-rw-r--r--pcr/docker-registry/PKGBUILD59
1 files changed, 59 insertions, 0 deletions
diff --git a/pcr/docker-registry/PKGBUILD b/pcr/docker-registry/PKGBUILD
new file mode 100644
index 000000000..00f045179
--- /dev/null
+++ b/pcr/docker-registry/PKGBUILD
@@ -0,0 +1,59 @@
+# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the CC0 1.0 License.
+# Maintainer: Parabola Hackers <dev@lists.parabola.nu>
+
+pkgname=docker-registry
+pkgver=2.8.1
+pkgrel=1
+pkgdesc="Docker registry server and associated tools"
+arch=('armv7' 'i686' 'x86_64')
+url='https://github.com/docker/distribution.git'
+license=('Apache')
+makedepends=('go')
+source=("https://github.com/distribution/distribution/archive/refs/tags/v${pkgver}.tar.gz")
+sha512sums=('b9c8525051458ff4bf4592ca3ddba83c4325e88c6812ddb28c1567e331c1571f112e3b646ca970f0fe420f3b1d61d00f7151450d7b9948a08733606255731266')
+
+prepare(){
+ mkdir -p src/github.com/docker
+
+ mv "distribution-${pkgver}" src/github.com/docker/distribution
+
+ cd src/github.com/docker/distribution
+
+ sed "s/^VERSION=\$(.*)/VERSION=${pkgver}/" -i Makefile
+ sed "s/^REVISION=\$(.*)/REVISION=${pkgrel}/" -i Makefile
+}
+
+build(){
+ export GOPATH="$GOPATH:${PWD}"
+ cd src/github.com/docker/distribution
+
+ make binaries
+}
+
+package(){
+ cd src/github.com/docker/distribution
+
+ install -d "${pkgdir}/usr/bin/"
+ binaries="digest registry registry-api-descriptor-template"
+ for binary in ${binaries} ; do
+ install -m 755 "bin/${binary}" -t "${pkgdir}/usr/bin/"
+ done
+
+ install -d "${pkgdir}/usr/share/doc/${pkgname}/"
+ files="BUILDING.md CONTRIBUTING.md LICENSE MAINTAINERS README.md ROADMAP.md"
+ for file in ${files} ; do
+ install -m 644 "${file}" -t "${pkgdir}/usr/share/doc/${pkgname}/"
+ done
+
+ cp -r docs "${pkgdir}/usr/share/doc/${pkgname}/"
+
+ install -d "${pkgdir}/usr/share/doc/${pkgname}/registry-example-configs"
+ files="config-cache.yml config-example.yml config-dev.yml"
+ for file in ${files} ; do
+ install -m 644 \
+ "cmd/registry/${file}" \
+ -t "${pkgdir}/usr/share/doc/${pkgname}/registry-example-configs"
+ done
+}