- Introduce new unit test targets for Workspace and Sandbox V2 integration in the Makefile, ensuring comprehensive testing of the new features. - Update CI workflows to support MongoDB service for Sandbox V2 tests and improve Docker image handling. - Implement Workspace as a first-class entity, allowing for persistent storage decoupled from container lifecycles. - Enhance the Box struct to manage workspace IDs and update related methods for improved functionality. - Refactor tests to accommodate new Workspace features, ensuring robust testing of the integration. These changes significantly improve the testing framework and functionality of the Sandbox V2, enhancing the overall architecture and user experience.
39 lines
1.3 KiB
Docker
39 lines
1.3 KiB
Docker
# Sandbox V2 base image — self-contained, no dependency on V1 sandbox-base
|
|
FROM ubuntu:24.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
# Faster mirror for ARM64
|
|
RUN sed -i 's|http://ports.ubuntu.com/ubuntu-ports|http://mirrors.mit.edu/ubuntu-ports|g' /etc/apt/sources.list.d/ubuntu.sources 2>/dev/null || \
|
|
sed -i 's|http://ports.ubuntu.com/ubuntu-ports|http://mirrors.mit.edu/ubuntu-ports|g' /etc/apt/sources.list 2>/dev/null || true
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
tini \
|
|
curl wget git ca-certificates gnupg lsb-release jq \
|
|
vim less tree \
|
|
iputils-ping net-tools dnsutils telnet netcat-openbsd \
|
|
zip unzip tar gzip \
|
|
htop procps \
|
|
sed gawk grep \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /workspace
|
|
|
|
RUN useradd -m -s /bin/bash sandbox && \
|
|
chown -R sandbox:sandbox /workspace
|
|
|
|
# yao-grpc binary (replaces yao-bridge from V1)
|
|
ARG TARGETARCH
|
|
COPY yao-grpc-${TARGETARCH} /usr/local/bin/yao-grpc
|
|
RUN chmod +x /usr/local/bin/yao-grpc
|
|
|
|
# claude-proxy binary
|
|
COPY claude-proxy-${TARGETARCH} /usr/local/bin/claude-proxy
|
|
RUN chmod +x /usr/local/bin/claude-proxy
|
|
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
USER sandbox
|
|
ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint.sh"]
|
|
CMD ["sleep", "infinity"]
|