-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (25 loc) · 807 Bytes
/
Dockerfile
File metadata and controls
27 lines (25 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
FROM node:22-bookworm AS node-deps
WORKDIR /app
COPY package.json package-lock.json* tsconfig.json ./
COPY runtime/e2b-helper ./runtime/e2b-helper
RUN npm install
RUN npm run build
FROM golang:1.26-bookworm AS go-build
WORKDIR /src
ENV CGO_CFLAGS="-O0"
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
COPY --from=node-deps /app/runtime/e2b-helper/dist ./runtime/e2b-helper/dist
RUN go build -o /out/e2b-agents ./cmd/e2b-agents
FROM node:22-bookworm
WORKDIR /app
ENV APP_ADDR=:8080
ENV E2B_HELPER_SCRIPT=/app/runtime/e2b-helper/dist/helper.js
COPY package.json package-lock.json* ./
RUN npm install --omit=dev
COPY --from=node-deps /app/runtime/e2b-helper/dist ./runtime/e2b-helper/dist
COPY --from=go-build /out/e2b-agents /usr/local/bin/e2b-agents
EXPOSE 8080
ENTRYPOINT ["e2b-agents"]
CMD ["serve"]