Fix Docker/CI: reproducible Windows build, Dockerfile cleanup
- Fix Windows CI build to use npm ci instead of deleting lockfile and running npm install, ensuring reproducible cross-platform builds - Remove duplicate uv/ruff root installations from Dockerfile (only need the claude user installations) - Make AWS CLI install architecture-aware using uname -m for arm64 compatibility - Remove unused SiblingContainers component (dead code) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -192,8 +192,7 @@ jobs:
|
||||
run: |
|
||||
set "PATH=%USERPROFILE%\.cargo\bin;C:\Program Files\nodejs;%PATH%"
|
||||
if exist node_modules rmdir /s /q node_modules
|
||||
if exist package-lock.json del package-lock.json
|
||||
npm install
|
||||
npm ci
|
||||
|
||||
- name: Build frontend
|
||||
working-directory: ./app
|
||||
|
||||
@@ -1,67 +0,0 @@
|
||||
import { useState, useEffect, useCallback } from "react";
|
||||
import { listSiblingContainers } from "../../lib/tauri-commands";
|
||||
import type { SiblingContainer } from "../../lib/types";
|
||||
|
||||
export default function SiblingContainers() {
|
||||
const [containers, setContainers] = useState<SiblingContainer[]>([]);
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
const refresh = useCallback(async () => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const list = await listSiblingContainers();
|
||||
setContainers(list);
|
||||
} catch {
|
||||
// Silently fail
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
refresh();
|
||||
}, [refresh]);
|
||||
|
||||
return (
|
||||
<div className="p-4">
|
||||
<div className="flex items-center justify-between mb-3">
|
||||
<h3 className="text-sm font-medium">Sibling Containers</h3>
|
||||
<button
|
||||
onClick={refresh}
|
||||
disabled={loading}
|
||||
className="text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors"
|
||||
>
|
||||
{loading ? "..." : "Refresh"}
|
||||
</button>
|
||||
</div>
|
||||
{containers.length === 0 ? (
|
||||
<p className="text-xs text-[var(--text-secondary)]">No other containers found.</p>
|
||||
) : (
|
||||
<div className="space-y-2">
|
||||
{containers.map((c) => (
|
||||
<div
|
||||
key={c.id}
|
||||
className="px-3 py-2 bg-[var(--bg-primary)] border border-[var(--border-color)] rounded text-xs"
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<span
|
||||
className={`w-2 h-2 rounded-full flex-shrink-0 ${
|
||||
c.state === "running"
|
||||
? "bg-[var(--success)]"
|
||||
: "bg-[var(--text-secondary)]"
|
||||
}`}
|
||||
/>
|
||||
<span className="font-medium truncate">
|
||||
{c.names?.[0]?.replace(/^\//, "") ?? c.id.slice(0, 12)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="text-[var(--text-secondary)] mt-0.5 ml-4">
|
||||
{c.image} — {c.status}
|
||||
</div>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -50,9 +50,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
python3 \
|
||||
python3-pip \
|
||||
python3-venv \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& curl -LsSf https://astral.sh/uv/install.sh | sh \
|
||||
&& curl -LsSf https://astral.sh/ruff/install.sh | sh
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# ── Docker CLI (not daemon) ─────────────────────────────────────────────────
|
||||
RUN install -m 0755 -d /etc/apt/keyrings \
|
||||
@@ -65,8 +63,11 @@ RUN install -m 0755 -d /etc/apt/keyrings \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# ── AWS CLI v2 ───────────────────────────────────────────────────────────────
|
||||
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
|
||||
&& unzip awscliv2.zip && ./aws/install && rm -rf awscliv2.zip aws
|
||||
RUN ARCH=$(uname -m) && \
|
||||
curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" -o "awscliv2.zip" && \
|
||||
unzip -q awscliv2.zip && \
|
||||
./aws/install && \
|
||||
rm -rf awscliv2.zip aws
|
||||
|
||||
# ── Non-root user with passwordless sudo ─────────────────────────────────────
|
||||
RUN useradd -m -s /bin/bash -u 1000 claude \
|
||||
@@ -83,7 +84,7 @@ WORKDIR /home/claude
|
||||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
|
||||
ENV PATH="/home/claude/.cargo/bin:${PATH}"
|
||||
|
||||
# Add uv/ruff to PATH (installed to /root by default, reinstall for claude user)
|
||||
# Install uv and ruff for claude user
|
||||
RUN curl -LsSf https://astral.sh/uv/install.sh | sh \
|
||||
&& curl -LsSf https://astral.sh/ruff/install.sh | sh
|
||||
ENV PATH="/home/claude/.local/bin:/home/claude/.cargo/bin:${PATH}"
|
||||
|
||||
Reference in New Issue
Block a user