From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
To: 60770@debbugs.gnu.org
Cc: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Subject: [bug#60770] [PATCH v2] gnu: Add docker-registry
Date: Sat, 14 Jan 2023 19:26:00 +0100 [thread overview]
Message-ID: <20230114182600.13639-1-GNUtoo@cyberdimension.org> (raw)
In-Reply-To: <20230113045918.20196-1-GNUtoo@cyberdimension.org>
* gnu/packages/docker.scm (docker-registry): New variable.
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
---
gnu/packages/docker.scm | 81 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 81 insertions(+)
diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm
index 7d109dc94c..58c61ba02e 100644
--- a/gnu/packages/docker.scm
+++ b/gnu/packages/docker.scm
@@ -724,3 +724,84 @@ (define-public tini
processes produced from it are reaped and that signals are properly forwarded.
Tini is integrated with Docker.")
(license license:expat)))
+
+(define-public docker-registry
+ (package
+ (name "docker-registry")
+ (version "2.8.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/docker/distribution")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1w8zr97p2c62gm1lrdwqa704ivjsy25ylznrddbbpv63idwdbi9k"))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/docker/distribution"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'chdir-to-src
+ (lambda _ (chdir "src/github.com/docker/distribution")))
+ (add-after 'chdir-to-src 'fix-versioning
+ (lambda _
+ ;; The Makefile use git to compute the version and the
+ ;; revision. This requires the .git directory that we don't
+ ;; have anymore in the unpacked source.
+ (substitute* "Makefile" (("^VERSION=\\$\\(.*\\)")
+ (string-append "VERSION=v" #$version))
+ ;; The revision originally used the git hash with .m
+ ;; appended if there was any local modifications.
+ (("^REVISION=\\$\\(.*\\)") "REVISION=0"))))
+ (replace 'build
+ (lambda _
+ (invoke "make" "binaries")))
+ (replace 'install
+ (lambda _
+ (let ((bin (string-append #$output "/bin")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (file)
+ (install-file (string-append "bin/" file) bin))
+ '("digest"
+ "registry"
+ "registry-api-descriptor-template")))
+ (let ((doc (string-append
+ #$output "/share/doc/" #$name "-" #$version)))
+ (mkdir-p doc)
+ (for-each
+ (lambda (file)
+ (install-file file doc))
+ '("BUILDING.md"
+ "CONTRIBUTING.md"
+ "LICENSE"
+ "MAINTAINERS"
+ "README.md"
+ "ROADMAP.md"))
+ (copy-recursively "docs/" (string-append doc "/docs")))
+ (let ((examples
+ (string-append
+ #$output "/share/doc/" #$name "-" #$version
+ "/registry-example-configs")))
+ (mkdir-p examples)
+ (for-each
+ (lambda (file)
+ (install-file (string-append "cmd/registry/" file) examples))
+ '("config-cache.yml"
+ "config-example.yml"
+ "config-dev.yml")))))
+ (delete 'install-license-files))))
+ (home-page "https://github.com/docker/distribution")
+ (synopsis "Docker registry server and associated tools")
+ (description "The Docker registry server enable you to host your own
+docker registry. With it, there is also two other utilities:
+@itemize
+@item The digest utility is a tool that generates checksums compatibles with
+various docker manifest files.
+@item The registry-api-descriptor-template is a tool for generating API
+specifications from the docs/spec/api.md.tmpl file.
+@end itemize")
+ (license license:asl2.0)))
base-commit: ef0613a81dca73602e702cb5f5444ee94566f983
--
2.38.1
next prev parent reply other threads:[~2023-01-14 18:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 4:59 [bug#60770] [PATCH v1] gnu: Add docker-registry Denis 'GNUtoo' Carikli
2023-01-14 18:26 ` Denis 'GNUtoo' Carikli [this message]
2023-01-23 18:55 ` [bug#60770] [PATCH v2] " Denis 'GNUtoo' Carikli
2023-02-17 16:23 ` Christopher Baines
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230114182600.13639-1-GNUtoo@cyberdimension.org \
--to=gnutoo@cyberdimension.org \
--cc=60770@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.