From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id IEWLMm3lwGMz1gAAbAwnHQ (envelope-from ) for ; Fri, 13 Jan 2023 06:00:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CMaLMm3lwGMp0gAAauVa8A (envelope-from ) for ; Fri, 13 Jan 2023 06:00:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 5A942FE73 for ; Fri, 13 Jan 2023 06:00:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pGCAj-0003qG-4I; Fri, 13 Jan 2023 00:00:09 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGCAe-0003pu-RZ for guix-patches@gnu.org; Fri, 13 Jan 2023 00:00:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pGCAd-0000SQ-7M for guix-patches@gnu.org; Fri, 13 Jan 2023 00:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pGCAc-00057j-Oe for guix-patches@gnu.org; Fri, 13 Jan 2023 00:00:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60770] [PATCH v1] gnu: Add docker-registry Resent-From: Denis 'GNUtoo' Carikli Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Jan 2023 05:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60770 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60770@debbugs.gnu.org Cc: Denis 'GNUtoo' Carikli X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167358599019609 (code B ref -1); Fri, 13 Jan 2023 05:00:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jan 2023 04:59:50 +0000 Received: from localhost ([127.0.0.1]:49090 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGCAP-00056C-Ex for submit@debbugs.gnu.org; Thu, 12 Jan 2023 23:59:49 -0500 Received: from lists.gnu.org ([209.51.188.17]:55414) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pGCAN-000565-SH for submit@debbugs.gnu.org; Thu, 12 Jan 2023 23:59:48 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pGCAN-0003no-0U for guix-patches@gnu.org; Thu, 12 Jan 2023 23:59:47 -0500 Received: from cyberdimension.org ([2001:910:1314:ffff::1] helo=gnutoo.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1pGCAK-0000Qn-VG for guix-patches@gnu.org; Thu, 12 Jan 2023 23:59:46 -0500 Received: from gnutoo.cyberdimension.org (localhost [127.0.0.1]) by cyberdimension.org (OpenSMTPD) with ESMTP id ab8b61a3; Fri, 13 Jan 2023 04:57:24 +0000 (UTC) Received: from localhost.localdomain (localhost [::1]) by gnutoo.cyberdimension.org (OpenSMTPD) with ESMTP id 2324c0d5; Fri, 13 Jan 2023 04:57:24 +0000 (UTC) From: Denis 'GNUtoo' Carikli Date: Fri, 13 Jan 2023 05:59:18 +0100 Message-Id: <20230113045918.20196-1-GNUtoo@cyberdimension.org> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2001:910:1314:ffff::1; envelope-from=GNUtoo@cyberdimension.org; helo=gnutoo.cyberdimension.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673586029; a=rsa-sha256; cv=none; b=HIz9U0pkcOOfI9IH2EuDTbNEmReVx/PJ7clVRy7nAaLRuloucwIdiMs/kNjci08zQffhwG J0hUBM7aH6l9c110zOiqZlDODzLVRweUyZiDwS3erHv5CzvcYu5faJZod2bOXq6oHvtqka 2iAWaR9QDnVNdtdCf2Ptuv2a6utE/9DOFfasmibI6+yzgoeJqYdZqOQAK2wUZFRZAdeVY2 v+mpmzuvTGbLUL1D9FRMwTN0XULynGd+Bz6qO3/LAIpN9r8DbGBb4i4ioYtln4CkUp+RaK M/tfev/FMqyJ4HKnOMXJDbhsAncLuEe9tAC4nAMThrIkwlotO02TI9GWDTTrCw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673586029; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g5kOD1xlGPRc+nLM8JeYwRd0C1LxZQ9bHZ4iPswYbdQ=; b=eZyQ0yN8FRKhKLKRAkNFN8AD6a/t0fFgL3SK+457S7/7zYUPja2DuBde+afQGxaQHB3BXr erB7pb0wZ3G7wz9dJMQJnkx9CrfDHYVu/2z91O070QugGJVc5EJ564dT/ifmiZh/y8ZjIA q5gDd/D7xHFjKlEtWbIgKwB8i3zzyDXupInzrysNkL76MeHQhf6fZIlthA480nlkg9yYgW AsV0uzVyAO4kd9Ssm9mMfvjyEIVAnG/FdWo64qQRrMFgfqg8ZhRn+NdN4VS04wqWKhlYXP +RAfk8qSw7FVdcS8lYKjpvjd1i+8Qm9IHgIysl9mFeeAvIKt2feVTb30T93NIg== X-Migadu-Spam-Score: -0.30 X-Spam-Score: -0.30 X-Migadu-Queue-Id: 5A942FE73 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-TUID: hEkA5/E3rosg * gnu/packages/docker.scm (docker-registry): New variable. Signed-off-by: Denis 'GNUtoo' Carikli --- gnu/packages/docker.scm | 80 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) diff --git a/gnu/packages/docker.scm b/gnu/packages/docker.scm index 7d109dc94c..807c855a1a 100644 --- a/gnu/packages/docker.scm +++ b/gnu/packages/docker.scm @@ -724,3 +724,83 @@ (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"))) + (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