-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.yaml
More file actions
70 lines (58 loc) · 2.84 KB
/
Copy pathconfig.yaml
File metadata and controls
70 lines (58 loc) · 2.84 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
containers:
- name: opencode-bun-wasi
arch: amd64
mode: wasi
network: true # Enable networking support
output:
split_mb: 50
dockerfile: |
FROM node:20-bookworm-slim
# minimal runtime deps
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl bash git openssh-client unzip \
&& rm -rf /var/lib/apt/lists/*
# install bun (keeps node available for opencode)
RUN curl -fsSL https://bun.sh/install | bash
ENV BUN_INSTALL="/root/.bun"
ENV PATH="${BUN_INSTALL}/bin:${PATH}"
# pin for reproducibility (change version)
ARG OPENCODE_VERSION=0.?.?
RUN bun add -g "opencode-ai@${OPENCODE_VERSION}"
# optional: reduce size (if you don't need runtime installs via bunx)
RUN rm -rf /root/.bun/install/cache/*
WORKDIR /work
ENTRYPOINT ["/bin/bash"]
# - name: opencode-bun-emscripten
# arch: amd64
# mode: emscripten
# dockerfile: |
# FROM node:20-bookworm-slim
# RUN apt-get update && apt-get install -y --no-install-recommends \
# ca-certificates curl bash git openssh-client \
# && rm -rf /var/lib/apt/lists/*
# RUN curl -fsSL https://bun.sh/install | bash
# ENV BUN_INSTALL="/root/.bun"
# ENV PATH="${BUN_INSTALL}/bin:${PATH}"
# ARG OPENCODE_VERSION=0.?.?
# RUN bun add -g "opencode-ai@${OPENCODE_VERSION}"
# RUN rm -rf /root/.bun/install/cache/*
# WORKDIR /work
# ENTRYPOINT ["/bin/bash"]
# ─────────────────────────────────────────────────────────────────────────────
# Config Schema Reference:
# ─────────────────────────────────────────────────────────────────────────────
#
# containers[]:
# name: string # Required. Unique identifier for the output
# arch: string # Optional. Target architecture (default: "amd64")
# # Options: amd64, arm64
# mode: string # Optional. Conversion mode (default: "wasi")
# # Options: wasi, emscripten
# image: string # Source image from registry (mutually exclusive with dockerfile)
# dockerfile: string # Inline Dockerfile content (mutually exclusive with image)
# network: boolean # Optional. Enable networking support (default: false)
# # When enabled, adds --net=socket flag to c2w
# output:
# split_mb: number # Optional. Split WASM into chunks of this size in MB (default: 50)
# c2w:
# extra_flags: string # Optional. Additional flags to pass to c2w command