Update Dockerfile
Browse files- Dockerfile +8 -5
Dockerfile
CHANGED
|
@@ -9,14 +9,18 @@ ARG LUMIVERSE_REPO=https://github.com/CloudCompile/Lumiverse.git
|
|
| 9 |
ARG LUMIVERSE_REF=main
|
| 10 |
RUN git clone --depth 1 --branch "${LUMIVERSE_REF}" "${LUMIVERSE_REPO}" .
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
RUN
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
# Frontend build
|
| 16 |
WORKDIR /src/frontend
|
| 17 |
-
RUN
|
|
|
|
|
|
|
| 18 |
|
| 19 |
-
# ---- runtime image ----
|
| 20 |
FROM oven/bun:1-slim
|
| 21 |
|
| 22 |
ARG DEBIAN_FRONTEND=noninteractive
|
|
@@ -25,7 +29,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates
|
|
| 25 |
&& rm -rf /var/lib/apt/lists/*
|
| 26 |
|
| 27 |
WORKDIR /app
|
| 28 |
-
|
| 29 |
COPY --from=build /src/node_modules ./node_modules
|
| 30 |
COPY --from=build /src/package.json ./package.json
|
| 31 |
COPY --from=build /src/src ./src
|
|
|
|
| 9 |
ARG LUMIVERSE_REF=main
|
| 10 |
RUN git clone --depth 1 --branch "${LUMIVERSE_REF}" "${LUMIVERSE_REPO}" .
|
| 11 |
|
| 12 |
+
# Prevent bun from trying to migrate npm lockfiles during install
|
| 13 |
+
RUN rm -f package-lock.json npm-shrinkwrap.json yarn.lock pnpm-lock.yaml
|
| 14 |
+
|
| 15 |
+
# Backend deps (allow bun.lock* generation/updates inside the container build)
|
| 16 |
+
RUN bun install --production 2>/dev/null || bun install --production
|
| 17 |
|
| 18 |
# Frontend build
|
| 19 |
WORKDIR /src/frontend
|
| 20 |
+
RUN rm -f package-lock.json npm-shrinkwrap.json yarn.lock pnpm-lock.yaml
|
| 21 |
+
RUN bun install 2>/dev/null || bun install
|
| 22 |
+
RUN bun run build
|
| 23 |
|
|
|
|
| 24 |
FROM oven/bun:1-slim
|
| 25 |
|
| 26 |
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
| 29 |
&& rm -rf /var/lib/apt/lists/*
|
| 30 |
|
| 31 |
WORKDIR /app
|
|
|
|
| 32 |
COPY --from=build /src/node_modules ./node_modules
|
| 33 |
COPY --from=build /src/package.json ./package.json
|
| 34 |
COPY --from=build /src/src ./src
|