@cloudflare/sandbox 0.0.0-0ac3cfa → 0.0.0-0dad837

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,109 @@
1
1
  # @cloudflare/sandbox
2
2
 
3
+ ## 0.2.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#57](https://github.com/cloudflare/sandbox-sdk/pull/57) [`12bbd12`](https://github.com/cloudflare/sandbox-sdk/commit/12bbd1229c07ef8c1c0bf58a4235a27938155b08) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Add listFiles method
8
+
9
+ ## 0.2.3
10
+
11
+ ### Patch Changes
12
+
13
+ - [#53](https://github.com/cloudflare/sandbox-sdk/pull/53) [`c87db11`](https://github.com/cloudflare/sandbox-sdk/commit/c87db117693a86cfb667bf09fb7720d6a6e0524d) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Improve jupyterlab config to speed up startup
14
+
15
+ ## 0.2.2
16
+
17
+ ### Patch Changes
18
+
19
+ - [#51](https://github.com/cloudflare/sandbox-sdk/pull/51) [`4aceb32`](https://github.com/cloudflare/sandbox-sdk/commit/4aceb3215c836f59afcb88b2b325016b3f623f46) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Handle intermittent interpreter failures and decouple jupyter startup
20
+
21
+ ## 0.2.1
22
+
23
+ ### Patch Changes
24
+
25
+ - [#49](https://github.com/cloudflare/sandbox-sdk/pull/49) [`d81d2a5`](https://github.com/cloudflare/sandbox-sdk/commit/d81d2a563c9af8947d5444019ed4d6156db563e3) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Implement code interpreter API
26
+
27
+ ## 0.2.0
28
+
29
+ ### Minor Changes
30
+
31
+ - [#47](https://github.com/cloudflare/sandbox-sdk/pull/47) [`8a93d0c`](https://github.com/cloudflare/sandbox-sdk/commit/8a93d0cae18a25bda6506b8b0a08d9e9eb3bb290) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Change default directory to a clean /workspace
32
+
33
+ ## 0.1.4
34
+
35
+ ### Patch Changes
36
+
37
+ - [#46](https://github.com/cloudflare/sandbox-sdk/pull/46) [`7de28be`](https://github.com/cloudflare/sandbox-sdk/commit/7de28be482d9634551572d548c7c4b5842df812d) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Update README
38
+
39
+ - [#44](https://github.com/cloudflare/sandbox-sdk/pull/44) [`215ab49`](https://github.com/cloudflare/sandbox-sdk/commit/215ab494427d7e2a92bb9a25384cb493a221c200) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Update example to use env & cwd
40
+
41
+ - [#42](https://github.com/cloudflare/sandbox-sdk/pull/42) [`bb72193`](https://github.com/cloudflare/sandbox-sdk/commit/bb72193ad75695979bd1132206f481e91fe37325) Thanks [@jonasnobile](https://github.com/jonasnobile)! - Propagate `cwd` and `env` options in `executeCommand`
42
+
43
+ - [#27](https://github.com/cloudflare/sandbox-sdk/pull/27) [`fd5ec7f`](https://github.com/cloudflare/sandbox-sdk/commit/fd5ec7f34bc12b06320a89356c4af07801f52d64) Thanks [@threepointone](https://github.com/threepointone)! - remove yarn and pnpm from the image
44
+
45
+ ## 0.1.3
46
+
47
+ ### Patch Changes
48
+
49
+ - [#32](https://github.com/cloudflare/sandbox-sdk/pull/32) [`1a42464`](https://github.com/cloudflare/sandbox-sdk/commit/1a4246479369c5d0160705caf192aa1816540d52) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Bring back package README
50
+
51
+ ## 0.1.2
52
+
53
+ ### Patch Changes
54
+
55
+ - [#30](https://github.com/cloudflare/sandbox-sdk/pull/30) [`30e5c25`](https://github.com/cloudflare/sandbox-sdk/commit/30e5c25cf7d4b07f9049724206c531e2d5d29d5c) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Remove actions timeout
56
+
57
+ - [#29](https://github.com/cloudflare/sandbox-sdk/pull/29) [`d78508f`](https://github.com/cloudflare/sandbox-sdk/commit/d78508f7287a59e0423edd2999c2c83e9e34ccfd) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Create multi-platform Docker image and switch to Cloudflare official repo
58
+
59
+ ## 0.1.1
60
+
61
+ ### Patch Changes
62
+
63
+ - [`157dde9`](https://github.com/cloudflare/sandbox-sdk/commit/157dde9b1f23e9bb6f3e9c3f0514b639a8813897) Thanks [@threepointone](https://github.com/threepointone)! - update deps
64
+
65
+ - [`a04f6b6`](https://github.com/cloudflare/sandbox-sdk/commit/a04f6b6c0b2ef9e3ce0851b53769f1c10d8c6de6) Thanks [@threepointone](https://github.com/threepointone)! - trigger a build with updated deps
66
+
67
+ ## 0.1.0
68
+
69
+ ### Minor Changes
70
+
71
+ - [#24](https://github.com/cloudflare/sandbox-sdk/pull/24) [`cecde0a`](https://github.com/cloudflare/sandbox-sdk/commit/cecde0a7530a87deffd8562fb8b01d66ee80ee19) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Redesign command execution API
72
+
73
+ ### Patch Changes
74
+
75
+ - [#22](https://github.com/cloudflare/sandbox-sdk/pull/22) [`f5fcd52`](https://github.com/cloudflare/sandbox-sdk/commit/f5fcd52025d1f7958a374e69d75e3fc590275f3f) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Allow setting env variables dynamically and remove command restrictions
76
+
77
+ ## 0.0.9
78
+
79
+ ### Patch Changes
80
+
81
+ - [#20](https://github.com/cloudflare/sandbox-sdk/pull/20) [`f106fda`](https://github.com/cloudflare/sandbox-sdk/commit/f106fdac98e7ef35677326290d45cbf3af88982c) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - add preview URLs and dynamic port forwarding
82
+
83
+ ## 0.0.8
84
+
85
+ ### Patch Changes
86
+
87
+ - [`60af265`](https://github.com/cloudflare/sandbox-sdk/commit/60af265d834e83fd30a921a3e1be232f13fe24da) Thanks [@threepointone](https://github.com/threepointone)! - update dependencies
88
+
89
+ ## 0.0.7
90
+
91
+ ### Patch Changes
92
+
93
+ - [`d1c7c99`](https://github.com/cloudflare/sandbox-sdk/commit/d1c7c99df6555eff71bcd59852e4b8eed2ad8cb6) Thanks [@threepointone](https://github.com/threepointone)! - fix file operations
94
+
95
+ ## 0.0.6
96
+
97
+ ### Patch Changes
98
+
99
+ - [#9](https://github.com/cloudflare/sandbox-sdk/pull/9) [`24f5470`](https://github.com/cloudflare/sandbox-sdk/commit/24f547048d5a26137de4656cea13d83ad2cc0b43) Thanks [@ItsWendell](https://github.com/ItsWendell)! - fix baseUrl for stub and stub forwarding
100
+
101
+ ## 0.0.5
102
+
103
+ ### Patch Changes
104
+
105
+ - [#5](https://github.com/cloudflare/sandbox-sdk/pull/5) [`7c15b81`](https://github.com/cloudflare/sandbox-sdk/commit/7c15b817899e4d9e1f25747aaf439e5e9e880d15) Thanks [@ghostwriternr](https://github.com/ghostwriternr)! - Make package ready for deployment
106
+
3
107
  ## 0.0.4
4
108
 
5
109
  ### Patch Changes
package/Dockerfile CHANGED
@@ -1,16 +1,106 @@
1
- # syntax=docker/dockerfile:1
1
+ # Sandbox base image with development tools, Python, Node.js, and Bun
2
+ FROM oven/bun:latest AS bun-source
3
+ FROM ubuntu:22.04
2
4
 
3
- FROM oven/bun:latest
4
- # Set destination for COPY
5
- WORKDIR /app
5
+ # Prevent interactive prompts during package installation
6
+ ENV DEBIAN_FRONTEND=noninteractive
6
7
 
7
- # Install git
8
- RUN apt-get update && apt-get install -y git
8
+ # Install essential system packages and development tools
9
+ RUN apt-get update && apt-get install -y \
10
+ # Basic utilities
11
+ curl \
12
+ wget \
13
+ git \
14
+ unzip \
15
+ zip \
16
+ # Process management
17
+ procps \
18
+ htop \
19
+ # Build tools
20
+ build-essential \
21
+ pkg-config \
22
+ # Network tools
23
+ net-tools \
24
+ iputils-ping \
25
+ dnsutils \
26
+ # Text processing
27
+ jq \
28
+ vim \
29
+ nano \
30
+ # Python dependencies
31
+ python3.11 \
32
+ python3.11-dev \
33
+ python3-pip \
34
+ python3.11-venv \
35
+ # Other useful tools
36
+ sudo \
37
+ ca-certificates \
38
+ gnupg \
39
+ lsb-release \
40
+ strace \
41
+ && rm -rf /var/lib/apt/lists/*
9
42
 
10
- COPY container_src/* ./
11
- # RUN bun install
43
+ # Set Python 3.11 as default python3
44
+ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
12
45
 
13
- EXPOSE 3000
14
- # Run
15
- CMD ["bun", "index.ts"]
46
+ # Install Node.js 20 LTS
47
+ # Using the official NodeSource repository setup script
48
+ RUN apt-get update && apt-get install -y ca-certificates curl gnupg \
49
+ && mkdir -p /etc/apt/keyrings \
50
+ && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
51
+ && echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
52
+ && apt-get update \
53
+ && apt-get install -y nodejs \
54
+ && rm -rf /var/lib/apt/lists/*
16
55
 
56
+ # Install Bun from official image (avoids architecture compatibility issues)
57
+ COPY --from=bun-source /usr/local/bin/bun /usr/local/bin/bun
58
+ COPY --from=bun-source /usr/local/bin/bunx /usr/local/bin/bunx
59
+
60
+ # Install minimal Jupyter components
61
+ RUN pip3 install --no-cache-dir \
62
+ jupyter-server \
63
+ jupyter-client \
64
+ ipykernel \
65
+ orjson \
66
+ && python3 -m ipykernel install --user --name python3
67
+
68
+ # Install scientific packages
69
+ RUN pip3 install --no-cache-dir \
70
+ matplotlib \
71
+ numpy \
72
+ pandas \
73
+ seaborn
74
+
75
+ # Install JavaScript kernel (ijavascript) - using E2B's fork
76
+ RUN npm install -g --unsafe-perm git+https://github.com/e2b-dev/ijavascript.git \
77
+ && ijsinstall --install=global
78
+
79
+ # Set up container server directory
80
+ WORKDIR /container-server
81
+
82
+ # Verify installations
83
+ RUN python3 --version && \
84
+ node --version && \
85
+ npm --version && \
86
+ bun --version && \
87
+ jupyter --version && \
88
+ jupyter kernelspec list
89
+
90
+ # Copy container source files to server directory
91
+ COPY container_src/package.json ./
92
+ RUN bun install
93
+
94
+ COPY container_src/ ./
95
+
96
+ # Create clean workspace directory for users
97
+ RUN mkdir -p /workspace
98
+
99
+ # Expose the application port (3000 for control, 8888 for Jupyter)
100
+ EXPOSE 3000 8888
101
+
102
+ # Make startup script executable
103
+ RUN chmod +x startup.sh
104
+
105
+ # Use startup script
106
+ CMD ["./startup.sh"]