-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcodegen.Dockerfile
More file actions
55 lines (43 loc) · 2.05 KB
/
Copy pathcodegen.Dockerfile
File metadata and controls
55 lines (43 loc) · 2.05 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM golang:1.24.13 AS go-tools
# Install Golang deps
RUN go install github.com/bufbuild/buf/cmd/buf@v1.50.1 && \
go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.36.12 && \
go install connectrpc.com/connect/cmd/protoc-gen-connect-go@v1.19.1 && \
go install github.com/oapi-codegen/oapi-codegen/v2/cmd/oapi-codegen@v2.7.2 && \
go install github.com/princjef/gomarkdoc/cmd/gomarkdoc@v1.1.0
FROM python:3.10
# Set working directory
WORKDIR /workspace
# Copy installed Go deps from previous build step
COPY --from=go-tools /go /go
COPY --from=go-tools /usr/local/go /usr/local/go
# Add Go binary to PATH
ENV PATH="/usr/local/go/bin:/go/bin:${PATH}"
# The pinned E2B fork is a build-only upstream tool carrying the explode fix.
# It is never included in AgentBox wheels or sdists. See UPSTREAM.md.
# 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 ruff==0.11.13 pyyaml==6.0.3 e2b-openapi-python-client==0.26.2 protoc-gen-connectrpc==0.11.1 protoc-gen-py==0.1.1
# Install Node.js (pinned to match .tool-versions)
ENV NODE_VERSION=22.18.0
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/protoc-gen-connect-es@1.6.1 \
@bufbuild/protoc-gen-es@2.6.2 \
@redocly/cli@2.46.1
RUN pip install griffe2md==1.5.0
RUN npm install -g tsx@4.20.6
CMD ["make", "generate"]