Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Node modules (we'll install fresh in the image)
node_modules
npm-debug.log
yarn-error.log

# Tests
/**/*.spec.ts

# Logs
logs
*.log

# Environment files (optional for security)
.env
.env.*

# OS & editor junk
.DS_Store
Thumbs.db
*.swp
*.swo
.idea
.vscode

# Test coverage / build artifacts
coverage
dist
build
tmp
.cache

# Git
.git
.gitignore

# Dockerignore itself (not needed inside the image)
.dockerignore
Dockerfile
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM node:23.11-slim AS node_base
WORKDIR /app

FROM node_base AS builder
RUN npm install -g typescript shx

COPY package.json package-lock.json tsconfig.json ./
RUN --mount=type=cache,target=/root/.npm npm ci --ignore-scripts --omit-dev

COPY src ./src
RUN --mount=type=cache,target=/root/.npm npm run build

FROM node_base
COPY package.json package-lock.json ./
COPY --from=builder /app/dist ./dist
RUN --mount=type=cache,target=/root/.npm npm ci --ignore-scripts --omit-dev
ENTRYPOINT ["node", "/app/dist/index.js"]
2 changes: 1 addition & 1 deletion src/utils/tarball.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import zlib from 'node:zlib';
import { readFile, stat, readdir } from 'node:fs/promises';
import path from 'node:path';
import { execSync } from 'node:child_process';
// @ts-ignore
import * as tar from 'tar-stream';

export type GeneratedContent = { relativePath: string; contents: Uint8Array };
/**
* Creates a compressed tarball (tar.gz) from the contents of a workspace folder.
Expand Down