34 lines
922 B
Docker
34 lines
922 B
Docker
# Dockerfile.ci — ABE CI image with Playwright/Chromium
|
|
# Based on the official Playwright image which includes all browser dependencies.
|
|
# Usage:
|
|
# docker build -f Dockerfile.ci -t abe-ci .
|
|
# docker run --rm -e TARGET_URL=http://host.docker.internal:3000 abe-ci \
|
|
# npx ts-node src/cli/abe.ts explore --url $TARGET_URL --output junit
|
|
|
|
FROM mcr.microsoft.com/playwright:v1.40.0-jammy
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Node.js dependencies (production + dev for ts-node)
|
|
COPY package*.json ./
|
|
RUN npm ci
|
|
|
|
# Copy TypeScript source
|
|
COPY tsconfig.json ./
|
|
COPY src/ ./src/
|
|
|
|
# Build TypeScript
|
|
RUN npm run build
|
|
|
|
# Default reports directory
|
|
RUN mkdir -p /reports
|
|
|
|
ENV NODE_ENV=production
|
|
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
|
|
|
|
# Entrypoint: run ABE CLI
|
|
# Override CMD to pass custom flags, e.g.:
|
|
# docker run abe-ci node dist/cli/abe.js explore --url http://example.com
|
|
ENTRYPOINT ["node", "dist/cli/abe.js"]
|
|
CMD ["--help"]
|