Files
at-container-registry/pkg/appview/templates/pages/install.html
T

224 lines
7.9 KiB
HTML

{{ define "install" }}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Install ATCR Credential Helper - ATCR</title>
<link rel="stylesheet" href="/static/css/style.css">
<script src="https://unpkg.com/htmx.org@1.9.10"></script>
<style>
.install-page {
max-width: 800px;
margin: 0 auto;
padding: 2rem 1rem;
}
.install-section {
margin: 2rem 0;
}
.install-section h2 {
margin-bottom: 1rem;
color: #1a1a1a;
}
.install-section h3 {
margin: 1.5rem 0 0.5rem;
color: #4a4a4a;
font-size: 1.1rem;
}
.code-block {
background: #f5f5f5;
border: 1px solid #ddd;
border-radius: 4px;
padding: 1rem;
margin: 0.5rem 0 1rem;
overflow-x: auto;
}
.code-block code {
font-family: 'Monaco', 'Menlo', monospace;
font-size: 0.9rem;
line-height: 1.5;
}
.platform-tabs {
display: flex;
gap: 0.5rem;
border-bottom: 2px solid #e0e0e0;
margin-bottom: 1rem;
}
.platform-tab {
padding: 0.5rem 1rem;
cursor: pointer;
border: none;
background: none;
font-size: 1rem;
color: #666;
transition: all 0.2s;
}
.platform-tab:hover {
color: #000;
}
.platform-tab.active {
color: #0066cc;
border-bottom: 2px solid #0066cc;
margin-bottom: -2px;
}
.platform-content {
display: none;
}
.platform-content.active {
display: block;
}
.note {
background: #fff3cd;
border-left: 4px solid #ffc107;
padding: 1rem;
margin: 1rem 0;
}
.success {
background: #d4edda;
border-left: 4px solid #28a745;
padding: 1rem;
margin: 1rem 0;
}
</style>
</head>
<body>
{{ template "nav" . }}
<main class="container">
<div class="install-page">
<h1>Install ATCR Credential Helper</h1>
<p>The ATCR credential helper enables Docker to authenticate with ATCR registries using your ATProto identity.</p>
<div class="install-section">
<h2>Quick Install</h2>
<div class="platform-tabs">
<button class="platform-tab active" onclick="showPlatform('linux')">Linux / macOS</button>
<button class="platform-tab" onclick="showPlatform('windows')">Windows</button>
</div>
<div class="platform-content active" id="linux-content">
<h3>Using install script</h3>
<div class="code-block"><code>curl -fsSL {{ .RegistryURL }}/static/install.sh | bash</code></div>
<h3>Manual download</h3>
<div class="code-block"><code>curl -fsSLO {{ .RegistryURL }}/static/install.sh
chmod +x install.sh
./install.sh</code></div>
</div>
<div class="platform-content" id="windows-content">
<h3>Using PowerShell (Run as Administrator)</h3>
<div class="code-block"><code>iwr -useb {{ .RegistryURL }}/static/install.ps1 | iex</code></div>
<h3>Manual download</h3>
<div class="code-block"><code>Invoke-WebRequest -Uri {{ .RegistryURL }}/static/install.ps1 -OutFile install.ps1
.\install.ps1</code></div>
</div>
</div>
<div class="install-section">
<h2>Configure Docker</h2>
<p>After installation, configure Docker to use the credential helper:</p>
<h3>Create or edit <code>~/.docker/config.json</code></h3>
<div class="code-block"><code>{
"credHelpers": {
"{{ .RegistryURL }}": "atcr"
}
}</code></div>
<div class="note">
<strong>Note:</strong> If you have an existing <code>config.json</code>, add the <code>credHelpers</code> entry to your existing configuration.
</div>
</div>
<div class="install-section">
<h2>Authentication</h2>
<p>The credential helper will automatically prompt for authentication when you push or pull:</p>
<div class="code-block"><code>export ATCR_AUTO_AUTH=1
docker push {{ .RegistryURL }}/yourhandle/myapp:latest</code></div>
<p>This will:</p>
<ol>
<li>Open your browser for device authorization</li>
<li>Display a code to confirm</li>
<li>Store credentials securely</li>
<li>Proceed with your push/pull operation</li>
</ol>
<div class="success">
<strong>Success!</strong> Once authenticated, Docker commands work normally without any additional steps.
</div>
</div>
<div class="install-section">
<h2>Alternative: Use docker login</h2>
<p>You can also use <code>docker login</code> with your ATProto app password:</p>
<ol>
<li>Generate an app password in your ATProto account settings</li>
<li>Run: <code>docker login {{ .RegistryURL }}</code></li>
<li>Enter your handle as username</li>
<li>Enter your app password</li>
</ol>
<div class="note">
<strong>Note:</strong> App passwords are available in your Bluesky account settings under "App Passwords".
</div>
</div>
<div class="install-section">
<h2>Troubleshooting</h2>
<h3>Command not found</h3>
<p>Ensure the credential helper is in your PATH:</p>
<div class="code-block"><code># Check if installed
which docker-credential-atcr
# Add to PATH if needed
export PATH="/usr/local/bin:$PATH"</code></div>
<h3>Authentication failed</h3>
<p>Make sure auto-auth is enabled:</p>
<div class="code-block"><code>export ATCR_AUTO_AUTH=1</code></div>
<h3>Still having issues?</h3>
<p>Check the <a href="https://github.com/atcr-io/atcr/blob/main/INSTALLATION.md">full documentation</a> or <a href="https://github.com/atcr-io/atcr/issues">open an issue</a>.</p>
</div>
<div class="install-section">
<h2>Security</h2>
<ul>
<li>Credentials are stored in <code>~/.atcr/device.json</code> with secure permissions (0600)</li>
<li>Device secrets are issued per-device and can be revoked anytime</li>
<li>No passwords are stored locally</li>
<li>Uses ATProto OAuth with device authorization flow</li>
</ul>
</div>
</div>
</main>
<script>
function showPlatform(platform) {
// Update tabs
document.querySelectorAll('.platform-tab').forEach(tab => {
tab.classList.remove('active');
});
event.target.classList.add('active');
// Update content
document.querySelectorAll('.platform-content').forEach(content => {
content.classList.remove('active');
});
document.getElementById(platform + '-content').classList.add('active');
}
</script>
<div id="modal"></div>
<script src="/static/js/app.js"></script>
</body>
</html>
{{ end }}