mirror of
https://github.com/danielvici/tool-website.git
synced 2026-01-17 00:11:27 +00:00
update dockerfile to bun
This commit is contained in:
16
Dockerfile
16
Dockerfile
@@ -1,15 +1,25 @@
|
|||||||
|
# ---------- Build-Stage ----------
|
||||||
FROM node:22-alpine AS builder
|
FROM node:22-alpine AS builder
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apk add --no-cache curl \
|
||||||
|
&& curl -fsSL https://bun.sh/install | bash \
|
||||||
|
&& ln -s /root/.bun/bin/bun /usr/local/bin/bun
|
||||||
|
|
||||||
COPY package*.json ./
|
COPY package*.json ./
|
||||||
RUN npm ci --only=production
|
RUN bun install
|
||||||
|
|
||||||
COPY . .
|
COPY . .
|
||||||
RUN npm install
|
RUN bun run build
|
||||||
RUN npm run build
|
|
||||||
RUN ls -la dist/tools-website && ls -la dist/tools-website/browser
|
RUN ls -la dist/tools-website && ls -la dist/tools-website/browser
|
||||||
|
|
||||||
|
# ---------- Runtime-Stage ----------
|
||||||
FROM node:22-alpine
|
FROM node:22-alpine
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN npm install -g serve@14
|
RUN npm install -g serve@14
|
||||||
|
|
||||||
COPY --from=builder /app/dist/tools-website ./dist/tools-website
|
COPY --from=builder /app/dist/tools-website ./dist/tools-website
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
CMD ["serve", "-s", "dist/tools-website/browser", "-l", "3000"]
|
CMD ["serve", "-s", "dist/tools-website/browser", "-l", "3000"]
|
||||||
|
|||||||
Reference in New Issue
Block a user