From 2ebeb67215954a5b1335b08fe18dd2f9b2374bab Mon Sep 17 00:00:00 2001 From: geoffsee <> Date: Tue, 27 May 2025 15:25:57 -0400 Subject: [PATCH] Remove Dockerfile and update configuration to use Local.Dockerfile The Dockerfile was deleted as part of cleanup and consolidation efforts. Updated the configuration documentation to reference Local.Dockerfile instead for building the web-agent. --- Dockerfile | 88 ------------------------------------------- docs/configuration.md | 2 +- 2 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ef133fc..0000000 --- a/Dockerfile +++ /dev/null @@ -1,88 +0,0 @@ -# Stage 1: Build the Rust agent-core binary -FROM rust:1.73-slim-bullseye as agent-server-builder - -WORKDIR /build-context - -# Install only the minimal required build dependencies -RUN apt-get update && apt-get install -y --no-install-recommends \ - pkg-config \ - musl-tools \ - && rm -rf /var/core/apt/lists/* - -# Build for musl to ensure static linking -RUN rustup target add aarch64-unknown-linux-musl - -# Copy only necessary files for building -COPY Cargo.toml Cargo.lock ./ -COPY src ./src -COPY assets ./assets - -# Build with musl target for static linking -RUN cargo build --release --target aarch64-unknown-linux-musl && \ - strip /build-context/target/aarch64-unknown-linux-musl/release/agent-core - -# Stage 2: Build Bun dependencies -FROM oven/bun:alpine as node-builder - -# Install system dependencies and node-gyp -RUN apk add --no-cache \ - ca-certificates \ - curl \ - unzip \ - git \ - python3 \ - py3-pip \ - build-base \ - pkgconf \ - cmake \ - nodejs \ - npm \ - bash \ - chromium \ - nss \ - freetype \ - freetype-dev \ - harfbuzz \ - ca-certificates \ - ttf-freefont \ - font-noto-emoji \ - nodejs \ - wqy-zenhei \ - && rm -rf /var/cache/* \ - && mkdir /var/cache/apk \ - && npm install -g node-gyp - -WORKDIR /app -# dep files -COPY packages packages -COPY package.json package-lock.json ./ -## Install deps -RUN bun install && bun --filter='./packages/genaiscript-rust-shim' run buildShim - - -FROM node:20-bookworm as app - -WORKDIR /app - -# Install playwright -ENV PLAYWRIGHT_CHROMIUM_EXECUTABLE_PATH=/usr/lib/chromium/chromium \ - PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 -RUN npx -y playwright@1.49.1 install --with-deps chromium && npm install -g bun - - -COPY --from=node-builder /app/node_modules ./node_modules -COPY --from=node-builder /app/package.json . -COPY --from=agent-server-builder /build-context/target/aarch64-unknown-linux-musl/release/agent-server ./agent-server - -# Ensure the binary is executable -RUN chmod +x ./agent-core - -# copy agent source files -COPY packages/genaiscript-rust-shim/dist ./dist -COPY genaisrc ./genaisrc - -# Expose the required port -EXPOSE 3006 - -# Set the entrypoint to the Rust binary -ENTRYPOINT ["./agent-server"] diff --git a/docs/configuration.md b/docs/configuration.md index 11719d4..1317e13 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -33,7 +33,7 @@ services: web-agent: build: context: . - dockerfile: Dockerfile + dockerfile: Local.Dockerfile ports: - "3006:3006" environment: