barreloflube commited on
Commit
314e9de
·
1 Parent(s): 9f84f2e

chore: Enhance Bun installation robustness in Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -7
Dockerfile CHANGED
@@ -26,13 +26,17 @@ RUN mkdir -p /etc/apt/keyrings && \
26
  # Create and set working directory
27
  WORKDIR /app
28
 
29
- # Install Bun (following the official method)
30
- RUN curl -fsSL https://bun.sh/install | bash \
31
- && chmod +x /root/.bun/bin/bun \
32
- && ln -s /root/.bun/bin/bun /usr/local/bin/bun
33
-
34
- # Add Bun to PATH
35
- ENV PATH="/root/.bun/bin:$PATH"
 
 
 
 
36
 
37
  # Copy package.json and package-lock.json
38
  COPY package.json ./
 
26
  # Create and set working directory
27
  WORKDIR /app
28
 
29
+ # Install Bun with more robust permission handling
30
+ RUN curl -fsSL https://bun.sh/install | bash && \
31
+ # Make sure bun is executable
32
+ chmod 755 /root/.bun/bin/bun && \
33
+ # Create symlink in a standard PATH location
34
+ ln -sf /root/.bun/bin/bun /usr/local/bin/bun && \
35
+ # Verify bun works
36
+ bun --version
37
+
38
+ # Add Bun to PATH explicitly (backup method)
39
+ ENV PATH="/root/.bun/bin:/usr/local/bin:$PATH"
40
 
41
  # Copy package.json and package-lock.json
42
  COPY package.json ./