Add Dockerfile for Bun canary on Alpine
This commit is contained in:
parent
41c070d050
commit
684bf8c0ed
1 changed files with 26 additions and 0 deletions
26
Dockerfile
Normal file
26
Dockerfile
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Use Bun canary on Alpine
|
||||
FROM oven/bun:canary-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy package files first for caching
|
||||
COPY package.json bun.lockb ./
|
||||
|
||||
# Install all dependencies (including devDeps)
|
||||
RUN bun install
|
||||
|
||||
# Copy the rest of the project
|
||||
COPY . .
|
||||
|
||||
# Build the project
|
||||
RUN bun run build
|
||||
|
||||
# Remove devDependencies to shrink image
|
||||
RUN bun prune --prod
|
||||
|
||||
# Expose Vite preview port
|
||||
EXPOSE 4173
|
||||
|
||||
# Run the built project
|
||||
CMD ["bun", "run", "preview"]
|
||||
Loading…
Reference in a new issue