fix: install bun to /usr/local/bin so it persists when /root is PVC-mounted
This commit is contained in:
@@ -2,7 +2,7 @@ FROM ubuntu:24.04
|
|||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
ENV HOME=/root
|
ENV HOME=/root
|
||||||
ENV PATH="/root/.bun/bin:$PATH"
|
ENV PATH="/usr/local/bin:/root/.bun/bin:$PATH"
|
||||||
|
|
||||||
# Base tools
|
# Base tools
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
@@ -12,8 +12,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
nano vim htop netcat-openbsd dnsutils iputils-ping \
|
nano vim htop netcat-openbsd dnsutils iputils-ping \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Bun
|
# Bun — install to /usr/local so it's on the image filesystem, not the /root PVC
|
||||||
RUN curl -fsSL https://bun.sh/install | bash
|
RUN curl -fsSL https://bun.sh/install | bash -s -- --install-dir /usr/local/bin \
|
||||||
|
&& ln -sf /usr/local/bin/bun /usr/local/bin/bunx
|
||||||
|
|
||||||
# Claude Code CLI
|
# Claude Code CLI
|
||||||
RUN curl -fsSL https://claude.ai/install.sh | bash
|
RUN curl -fsSL https://claude.ai/install.sh | bash
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fi
|
|||||||
if [ ! -f /root/.bashrc ]; then
|
if [ ! -f /root/.bashrc ]; then
|
||||||
cp /etc/skel/.bashrc /root/.bashrc 2>/dev/null || true
|
cp /etc/skel/.bashrc /root/.bashrc 2>/dev/null || true
|
||||||
cat >> /root/.bashrc <<'EOF'
|
cat >> /root/.bashrc <<'EOF'
|
||||||
export PATH="/root/.bun/bin:$PATH"
|
export PATH="/usr/local/bin:$PATH"
|
||||||
export HISTFILE=/root/.bash_history
|
export HISTFILE=/root/.bash_history
|
||||||
export HISTSIZE=10000
|
export HISTSIZE=10000
|
||||||
EOF
|
EOF
|
||||||
@@ -24,7 +24,7 @@ fi
|
|||||||
|
|
||||||
if [ ! -f /root/.profile ]; then
|
if [ ! -f /root/.profile ]; then
|
||||||
cat > /root/.profile <<'EOF'
|
cat > /root/.profile <<'EOF'
|
||||||
export PATH="/root/.bun/bin:$PATH"
|
export PATH="/usr/local/bin:$PATH"
|
||||||
[ -f /root/.bashrc ] && . /root/.bashrc
|
[ -f /root/.bashrc ] && . /root/.bashrc
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user