Commit
·
104ff23
1
Parent(s):
559490f
chore: Optimize Dockerfile for Bun installation and path configuration
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
@@ -12,15 +12,17 @@ RUN apt-get update && apt-get install -y \
|
|
12 |
unzip \
|
13 |
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
-
#
|
16 |
-
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
# Add Bun to PATH
|
19 |
ENV PATH="/root/.bun/bin:$PATH"
|
20 |
|
21 |
-
# Create and set working directory
|
22 |
-
WORKDIR /app
|
23 |
-
|
24 |
# Copy package.json and package-lock.json
|
25 |
COPY package.json ./
|
26 |
COPY bun.lock ./
|
@@ -38,4 +40,4 @@ RUN bun run build
|
|
38 |
EXPOSE 7860
|
39 |
|
40 |
# Command to run the application
|
41 |
-
CMD bun run preview
|
|
|
12 |
unzip \
|
13 |
&& rm -rf /var/lib/apt/lists/*
|
14 |
|
15 |
+
# Create and set working directory
|
16 |
+
WORKDIR /app
|
17 |
+
|
18 |
+
# Install Bun (following the official method)
|
19 |
+
RUN curl -fsSL https://bun.sh/install | bash \
|
20 |
+
&& chmod +x /root/.bun/bin/bun \
|
21 |
+
&& ln -s /root/.bun/bin/bun /usr/local/bin/bun
|
22 |
|
23 |
# Add Bun to PATH
|
24 |
ENV PATH="/root/.bun/bin:$PATH"
|
25 |
|
|
|
|
|
|
|
26 |
# Copy package.json and package-lock.json
|
27 |
COPY package.json ./
|
28 |
COPY bun.lock ./
|
|
|
40 |
EXPOSE 7860
|
41 |
|
42 |
# Command to run the application
|
43 |
+
CMD ["bun", "run", "preview"]
|