A container registry that uses the AT Protocol for manifest storage and S3 for blob storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at codeberg-source 54 lines 1.5 kB view raw
1# typed: false 2# frozen_string_literal: true 3 4class DockerCredentialAtcr < Formula 5 desc "Docker credential helper for ATCR (ATProto Container Registry)" 6 homepage "https://atcr.io" 7 url "https://github.com/atcr-io/atcr/archive/refs/tags/v0.0.1.tar.gz" 8 sha256 "REPLACE_WITH_TARBALL_SHA256" 9 license "MIT" 10 head "https://github.com/atcr-io/atcr.git", branch: "main" 11 12 depends_on "go" => :build 13 14 def install 15 # Build the credential helper binary 16 # Use ldflags to inject version information 17 ldflags = %W[ 18 -s -w 19 -X main.version=#{version} 20 -X main.commit=#{tap.user} 21 -X main.date=#{time.iso8601} 22 ] 23 24 system "go", "build", *std_go_args(ldflags:, output: bin/"docker-credential-atcr"), "./cmd/credential-helper" 25 end 26 27 test do 28 # Test that the binary exists and is executable 29 assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1") 30 end 31 32 def caveats 33 <<~EOS 34 To configure Docker to use ATCR credential helper, add the following 35 to your ~/.docker/config.json: 36 37 { 38 "credHelpers": { 39 "atcr.io": "atcr" 40 } 41 } 42 43 Note: The credential helper name is "atcr" (Docker automatically prefixes 44 with "docker-credential-" when looking for the binary). 45 46 To authenticate with ATCR: 47 docker push atcr.io/<your-handle>/<image>:latest 48 49 This will open your browser to complete the OAuth device flow. 50 51 Configuration is stored in: ~/.atcr/device.json 52 EOS 53 end 54end