A container registry that uses the AT Protocol for manifest storage and S3 for blob storage. atcr.io
docker container atproto go
73
fork

Configure Feed

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

improvements to brew instructions (still not fully implemented)

+47 -283
+43
.goreleaser.yaml
··· 45 45 checksum: 46 46 name_template: 'checksums.txt' 47 47 48 + brews: 49 + - name: docker-credential-atcr 50 + ids: 51 + - credential-helper 52 + repository: 53 + # DID-based owner keeps this stable across Tangled handle renames. 54 + # Replace TAP_REPO_DID with the did:plc of the tap repo once created. 55 + owner: 'did:plc:TAP_REPO_DID' 56 + name: homebrew-tap 57 + branch: main 58 + git: 59 + url: 'git@knot1.tangled.sh:did:plc:TAP_REPO_DID/homebrew-tap' 60 + private_key: '{{ .Env.TAP_SSH_KEY }}' 61 + directory: Formula 62 + url_template: "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v{{ .Version }}/download/{{ .ArtifactName }}" 63 + homepage: "https://atcr.io" 64 + description: "Docker credential helper for ATCR (ATProto Container Registry)" 65 + license: "MIT" 66 + commit_author: 67 + name: atcr-bot 68 + email: releases@atcr.io 69 + commit_msg_template: "Brew formula update for {{ .ProjectName }} version {{ .Tag }}" 70 + install: | 71 + bin.install "docker-credential-atcr" 72 + test: | 73 + assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1") 74 + caveats: | 75 + To finish setup, run: 76 + docker-credential-atcr configure-docker 77 + 78 + This writes the credential helper entry to ~/.docker/config.json. Or 79 + add manually: 80 + { 81 + "credHelpers": { 82 + "atcr.io": "atcr" 83 + } 84 + } 85 + 86 + Then push an image to trigger device authorization: 87 + docker push atcr.io/<your-handle>/<image>:latest 88 + 89 + Credentials live in ~/.atcr/device.json (0600). 90 + 48 91 snapshot: 49 92 version_template: "{{ incpatch .Version }}-next" 50 93
-59
Formula/docker-credential-atcr.rb
··· 1 - # typed: false 2 - # frozen_string_literal: true 3 - 4 - class DockerCredentialAtcr < Formula 5 - desc "Docker credential helper for ATCR (ATProto Container Registry)" 6 - homepage "https://atcr.io" 7 - version "0.0.1" 8 - license "MIT" 9 - 10 - on_macos do 11 - on_arm do 12 - url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Darwin_arm64.tar.gz" 13 - sha256 "REPLACE_WITH_SHA256" 14 - end 15 - on_intel do 16 - url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Darwin_x86_64.tar.gz" 17 - sha256 "REPLACE_WITH_SHA256" 18 - end 19 - end 20 - 21 - on_linux do 22 - on_arm do 23 - url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Linux_arm64.tar.gz" 24 - sha256 "REPLACE_WITH_SHA256" 25 - end 26 - on_intel do 27 - url "https://tangled.org/evan.jarrett.net/at-container-registry/tags/v0.0.1/download/docker-credential-atcr_0.0.1_Linux_x86_64.tar.gz" 28 - sha256 "REPLACE_WITH_SHA256" 29 - end 30 - end 31 - 32 - def install 33 - bin.install "docker-credential-atcr" 34 - end 35 - 36 - test do 37 - assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1") 38 - end 39 - 40 - def caveats 41 - <<~EOS 42 - To configure Docker to use ATCR credential helper, add the following 43 - to your ~/.docker/config.json: 44 - 45 - { 46 - "credHelpers": { 47 - "atcr.io": "atcr" 48 - } 49 - } 50 - 51 - Or run: docker-credential-atcr configure-docker 52 - 53 - To authenticate with ATCR: 54 - docker push atcr.io/<your-handle>/<image>:latest 55 - 56 - Configuration is stored in: ~/.atcr/config.json 57 - EOS 58 - end 59 - end
+4 -3
INSTALLATION.md
··· 40 40 ### Using Homebrew (macOS and Linux) 41 41 42 42 ```bash 43 - # Add the ATCR tap 44 - brew tap atcr-io/tap 43 + # Add the ATCR tap (hosted on Tangled, so pass the URL explicitly). 44 + # DID-based URL is stable across any future handle rename. 45 + brew tap atcr/tap https://tangled.org/did:plc:TAP_REPO_DID/homebrew-tap 45 46 46 47 # Install the credential helper 47 48 brew install docker-credential-atcr ··· 55 56 56 57 ### Manual Installation 57 58 58 - 1. **Download the binary** for your platform from [GitHub Releases](https://github.com/atcr-io/atcr/releases) 59 + 1. **Download the binary** for your platform from [Tangled tags](https://tangled.org/evan.jarrett.net/at-container-registry/tags) 59 60 60 61 - Linux amd64: `docker-credential-atcr_VERSION_Linux_x86_64.tar.gz` 61 62 - Linux arm64: `docker-credential-atcr_VERSION_Linux_arm64.tar.gz`
-221
scripts/update-homebrew-formula.sh
··· 1 - #!/usr/bin/env bash 2 - # 3 - # update-homebrew-formula.sh - Update Homebrew formula after a GoReleaser release 4 - # 5 - # Usage: ./scripts/update-homebrew-formula.sh <version> [--push] 6 - # 7 - # Example: ./scripts/update-homebrew-formula.sh v0.0.2 8 - # ./scripts/update-homebrew-formula.sh v0.0.2 --push 9 - # 10 - # This script: 11 - # 1. Downloads pre-built archives from Tangled for each platform 12 - # 2. Computes SHA256 checksums 13 - # 3. Generates the updated formula 14 - # 4. Optionally clones the homebrew-tap repo, commits, and pushes 15 - # 16 - # If GoReleaser dist/ directory exists locally, checksums are read from there instead. 17 - # 18 - 19 - set -euo pipefail 20 - 21 - RED='\033[0;31m' 22 - GREEN='\033[0;32m' 23 - YELLOW='\033[1;33m' 24 - NC='\033[0m' 25 - 26 - TANGLED_REPO="https://tangled.org/evan.jarrett.net/at-container-registry" 27 - TAP_REPO="https://tangled.org/evan.jarrett.net/homebrew-tap" 28 - BINARY_NAME="docker-credential-atcr" 29 - FORMULA_PATH="Formula/docker-credential-atcr.rb" 30 - 31 - PLATFORMS=( 32 - "Darwin_arm64" 33 - "Darwin_x86_64" 34 - "Linux_arm64" 35 - "Linux_x86_64" 36 - ) 37 - 38 - if [ $# -lt 1 ]; then 39 - echo -e "${RED}Error: Missing required argument${NC}" 40 - echo "Usage: $0 <version> [--push]" 41 - echo "" 42 - echo "Example: $0 v0.0.2" 43 - echo " $0 v0.0.2 --push" 44 - exit 1 45 - fi 46 - 47 - VERSION="$1" 48 - PUSH=false 49 - if [ "${2:-}" = "--push" ]; then 50 - PUSH=true 51 - fi 52 - 53 - # Add 'v' prefix if not present 54 - if [[ ! "$VERSION" =~ ^v ]]; then 55 - VERSION="v${VERSION}" 56 - fi 57 - VERSION_NO_V="${VERSION#v}" 58 - 59 - echo -e "${GREEN}Updating Homebrew formula for ${VERSION}${NC}" 60 - echo "" 61 - 62 - TEMP_DIR=$(mktemp -d) 63 - trap 'rm -rf "$TEMP_DIR"' EXIT 64 - 65 - # Compute SHA256 for each platform archive 66 - declare -A CHECKSUMS 67 - 68 - sha256_of_file() { 69 - if command -v sha256sum &> /dev/null; then 70 - sha256sum "$1" | awk '{print $1}' 71 - elif command -v shasum &> /dev/null; then 72 - shasum -a 256 "$1" | awk '{print $1}' 73 - else 74 - echo -e "${RED}Error: sha256sum or shasum not found${NC}" >&2 75 - exit 1 76 - fi 77 - } 78 - 79 - # Check if GoReleaser dist/ has the archives locally 80 - GORELEASER_DIST="dist" 81 - if [ -f "${GORELEASER_DIST}/checksums.txt" ]; then 82 - echo -e "${YELLOW}Using local GoReleaser dist/ for checksums${NC}" 83 - for platform in "${PLATFORMS[@]}"; do 84 - archive="${BINARY_NAME}_${VERSION_NO_V}_${platform}.tar.gz" 85 - checksum=$(grep "${archive}" "${GORELEASER_DIST}/checksums.txt" | awk '{print $1}') 86 - if [ -z "$checksum" ]; then 87 - echo -e "${RED}Missing checksum for ${archive} in dist/checksums.txt${NC}" 88 - exit 1 89 - fi 90 - CHECKSUMS[$platform]="$checksum" 91 - echo -e " ${GREEN}✓${NC} ${platform}: ${checksum}" 92 - done 93 - else 94 - echo -e "${YELLOW}Downloading archives from Tangled to compute checksums...${NC}" 95 - for platform in "${PLATFORMS[@]}"; do 96 - archive="${BINARY_NAME}_${VERSION_NO_V}_${platform}.tar.gz" 97 - url="${TANGLED_REPO}/tags/${VERSION}/download/${archive}" 98 - dest="${TEMP_DIR}/${archive}" 99 - 100 - echo -n " ${platform}... " 101 - if curl -sSfL -o "$dest" "$url"; then 102 - CHECKSUMS[$platform]=$(sha256_of_file "$dest") 103 - echo -e "${GREEN}✓${NC} ${CHECKSUMS[$platform]}" 104 - else 105 - echo -e "${RED}✗ Failed to download${NC}" 106 - echo " URL: ${url}" 107 - exit 1 108 - fi 109 - done 110 - fi 111 - 112 - echo "" 113 - 114 - # Generate the formula 115 - FORMULA=$(cat <<RUBY 116 - # typed: false 117 - # frozen_string_literal: true 118 - 119 - class DockerCredentialAtcr < Formula 120 - desc "Docker credential helper for ATCR (ATProto Container Registry)" 121 - homepage "https://atcr.io" 122 - version "${VERSION_NO_V}" 123 - license "MIT" 124 - 125 - on_macos do 126 - on_arm do 127 - url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Darwin_arm64.tar.gz" 128 - sha256 "${CHECKSUMS[Darwin_arm64]}" 129 - end 130 - on_intel do 131 - url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Darwin_x86_64.tar.gz" 132 - sha256 "${CHECKSUMS[Darwin_x86_64]}" 133 - end 134 - end 135 - 136 - on_linux do 137 - on_arm do 138 - url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Linux_arm64.tar.gz" 139 - sha256 "${CHECKSUMS[Linux_arm64]}" 140 - end 141 - on_intel do 142 - url "${TANGLED_REPO}/tags/${VERSION}/download/${BINARY_NAME}_${VERSION_NO_V}_Linux_x86_64.tar.gz" 143 - sha256 "${CHECKSUMS[Linux_x86_64]}" 144 - end 145 - end 146 - 147 - def install 148 - bin.install "docker-credential-atcr" 149 - end 150 - 151 - test do 152 - assert_match version.to_s, shell_output("#{bin}/docker-credential-atcr version 2>&1") 153 - end 154 - 155 - def caveats 156 - <<~EOS 157 - To configure Docker to use ATCR credential helper, add the following 158 - to your ~/.docker/config.json: 159 - 160 - { 161 - "credHelpers": { 162 - "atcr.io": "atcr" 163 - } 164 - } 165 - 166 - Or run: docker-credential-atcr configure-docker 167 - 168 - To authenticate with ATCR: 169 - docker push atcr.io/<your-handle>/<image>:latest 170 - 171 - Configuration is stored in: ~/.atcr/config.json 172 - EOS 173 - end 174 - end 175 - RUBY 176 - ) 177 - 178 - # Write to local formula 179 - echo "$FORMULA" > "${FORMULA_PATH}" 180 - echo -e "${GREEN}✓ Updated ${FORMULA_PATH}${NC}" 181 - 182 - if [ "$PUSH" = true ]; then 183 - echo "" 184 - echo -e "${YELLOW}Pushing to homebrew-tap repo...${NC}" 185 - 186 - TAP_DIR="${TEMP_DIR}/homebrew-tap" 187 - git clone "$TAP_REPO" "$TAP_DIR" 2>/dev/null || { 188 - echo -e "${YELLOW}Tap repo not found, initializing new repo${NC}" 189 - mkdir -p "$TAP_DIR" 190 - cd "$TAP_DIR" 191 - git init 192 - git remote add origin "$TAP_REPO" 193 - } 194 - 195 - mkdir -p "${TAP_DIR}/Formula" 196 - cp "${FORMULA_PATH}" "${TAP_DIR}/Formula/" 197 - 198 - cd "$TAP_DIR" 199 - git add Formula/docker-credential-atcr.rb 200 - git commit -m "Update docker-credential-atcr to ${VERSION}" 201 - git push origin HEAD 202 - 203 - echo -e "${GREEN}✓ Pushed to ${TAP_REPO}${NC}" 204 - else 205 - echo "" 206 - echo -e "${YELLOW}Next steps:${NC}" 207 - echo "1. Review the formula: ${FORMULA_PATH}" 208 - echo "2. Push to your homebrew-tap repo on Tangled:" 209 - echo " cd /path/to/homebrew-tap" 210 - echo " cp ${FORMULA_PATH} Formula/" 211 - echo " git add Formula/ && git commit -m 'Update to ${VERSION}' && git push" 212 - echo "" 213 - echo "Or re-run with --push to do this automatically:" 214 - echo " $0 ${VERSION} --push" 215 - fi 216 - 217 - echo "" 218 - echo -e "${GREEN}Users can install/upgrade with:${NC}" 219 - echo " brew tap atcr/tap ${TAP_REPO}" 220 - echo " brew install docker-credential-atcr" 221 - echo " brew upgrade docker-credential-atcr"