diff --git a/roverctl-web/Dockerfile b/roverctl-web/Dockerfile index 5030302..5b892eb 100644 --- a/roverctl-web/Dockerfile +++ b/roverctl-web/Dockerfile @@ -1,8 +1,9 @@ # Source: https://gist.github.com/aradalvand/04b2cad14b00e5ffe8ec96a3afbb34fb -FROM node:20-alpine AS builder +FROM oven/bun:1-alpine AS builder WORKDIR /app COPY package*.json . -RUN npm ci +COPY bun.lockb* . +RUN bun install --frozen-lockfile COPY . . # These are runtime arguments, but they do need to exist at built time to be able to import from public in svelte ARG PUBLIC_ROVERD_HOST="" @@ -12,14 +13,14 @@ ARG PUBLIC_ROVERD_PASSWORD="" ARG PUBLIC_PASSTHROUGH_HOST="" ARG PUBLIC_PASSTHROUGH_PORT="" -RUN npm run build -RUN npm prune --production +RUN bun run build +RUN bun install --production --frozen-lockfile -FROM node:20-alpine +FROM oven/bun:1-alpine WORKDIR /app COPY --from=builder /app/build build/ COPY --from=builder /app/node_modules node_modules/ COPY package.json . EXPOSE 3000 ENV NODE_ENV=production -CMD [ "node", "build" ] \ No newline at end of file +CMD [ "bun", "run", "build/index.js" ] \ No newline at end of file