forked from sheikyerbouti100/kosuke-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.local
More file actions
46 lines (33 loc) · 1.18 KB
/
Dockerfile.local
File metadata and controls
46 lines (33 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# syntax=docker/dockerfile:1.4
# Local Development Dockerfile
# This file is used for local development with hot reload support
# Stage 1: Install dependencies with Bun
FROM oven/bun:1.3.1-slim AS deps
WORKDIR /app
# Copy package files
COPY package.json bun.lock ./
# Install dependencies with Bun
RUN --mount=type=cache,target=/root/.bun/install/cache \
bun install --frozen-lockfile
# Stage 2: Runtime with Node.js only
FROM node:22.20.0-slim
WORKDIR /app
# Install git and CA certificates for repository operations
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Install Claude Code CLI globally (required by @anthropic-ai/claude-agent-sdk)
RUN npm install -g @anthropic-ai/claude-code
# Copy dependencies from deps stage with proper ownership
COPY --from=deps /app/node_modules ./node_modules
COPY --from=deps /app/package.json ./package.json
COPY --from=deps /app/bun.lock ./bun.lock
# Development environment
ENV NODE_ENV=development
ENV HOSTNAME=0.0.0.0
EXPOSE 3000
# Run development server with Node.js
# Source code will be mounted as volume for hot reload
CMD ["npm", "run", "dev"]