Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

1.7 KB
Raw Blame
FROM golang:1.26.10

# Install Golang deps
RUN go install github.com/bufbuild/buf/cmd/[email protected] && \
    go install google.golang.org/protobuf/cmd/[email protected] && \
    go install connectrpc.com/connect/cmd/[email protected]


FROM python:3.11

# Set working directory
WORKDIR /workspace

# Copy installed Go deps from previous build step
COPY --from=0 /go /go

# Add Go binary to PATH
ENV PATH="/go/bin:${PATH}"

# Install Python deps (e2b-openapi-python-client is patched version to fix issue with explode)
# https://github.com/openapi-generators/openapi-python-client/pull/1296
# protoc-gen-py generates the Python envd protobuf-py messages and
# protoc-gen-connectrpc the Connect stubs.
RUN pip install black==26.3.1 e2b-openapi-python-client==0.26.2 datamodel-code-generator==0.64.0 protoc-gen-connectrpc==0.12.1 protoc-gen-py==0.6.0

# Install Node.js (pinned to match .tool-versions)
ENV NODE_VERSION=22.23.4
RUN ARCH=$(uname -m) && \
    case "$ARCH" in \
        x86_64) NODE_ARCH="x64" ;; \
        arm64|aarch64) NODE_ARCH="arm64" ;; \
        *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \
    esac && \
    curl -fsSL https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-${NODE_ARCH}.tar.xz | tar -xJ -C /usr/local --strip-components=1

# Install Node.js deps
# pnpm is pinned to match .tool-versions and the root `packageManager` field —
# pnpm manages its own version from `packageManager` since v10, so a mismatch
# would make it re-download itself on every `make generate`.
ENV PNPM_VERSION=10.34.5
RUN npm install -g \
    pnpm@${PNPM_VERSION} \
    @connectrpc/[email protected] \
    @bufbuild/[email protected] \
    @redocly/[email protected]

CMD ["make", "generate"]