chore: clean Dockerfile (remove openclaw dep), delete stale data/, fix .dockerignore

This commit is contained in:
outsourc-e
2026-03-16 16:08:52 -04:00
parent 88c5d43aef
commit 9128f40454
2 changed files with 3 additions and 21 deletions

View File

@@ -1,7 +1,6 @@
node_modules
dist
.output
src-tauri
releases
tmp
research

View File

@@ -2,24 +2,13 @@
FROM node:22-alpine AS builder
WORKDIR /app
# Skip Playwright browser download (not needed for production)
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
COPY package.json package-lock.json .npmrc ./
RUN npm ci
COPY package.json pnpm-lock.yaml .npmrc ./
RUN npm install -g pnpm && pnpm install --frozen-lockfile
COPY . .
RUN npm run build
# --- Fetch built-in Hermes-compatible skills ---
FROM node:22-alpine AS skills
WORKDIR /tmp
RUN apk add --no-cache git && \
npm install --global --ignore-scripts openclaw@latest
# Copy just the skills directory
RUN SKILLS_DIR=$(npm root -g)/openclaw/skills && \
mkdir -p /openclaw-skills && \
if [ -d "$SKILLS_DIR" ]; then cp -r "$SKILLS_DIR"/* /openclaw-skills/; fi
RUN pnpm build
# --- Production stage ---
FROM node:22-alpine AS runner
@@ -27,19 +16,13 @@ WORKDIR /app
ENV NODE_ENV=production
# Create non-root user
RUN addgroup -S hermes && adduser -S hermes -G hermes
# Copy build output and package.json (for any runtime deps)
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./
COPY --from=builder /app/server-entry.js ./
# Copy built-in Hermes-compatible skills
COPY --from=skills /openclaw-skills ./openclaw-skills
# Expose default port
EXPOSE 3000
USER hermes