-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathSandboxDockerfile
More file actions
64 lines (49 loc) · 2.01 KB
/
SandboxDockerfile
File metadata and controls
64 lines (49 loc) · 2.01 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
# FROM docker.io/cloudflare/sandbox:0.1.3
FROM docker.io/cloudflare/sandbox:0.5.6
ARG TARGETARCH
RUN apt-get update && \
apt-get install -y git ca-certificates curl procps net-tools && \
update-ca-certificates && \
case ${TARGETARCH} in \
"amd64") ARCH="amd64" ;; \
"arm64") ARCH="arm64" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}"; exit 1 ;; \
esac && \
curl -L -k --output cloudflared "https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-${ARCH}" && \
chmod +x cloudflared && \
mv cloudflared /usr/local/bin/ && \
rm -rf /var/lib/apt/lists/* && \
git config --global user.email "[email protected]" && \
git config --global user.name "Cloudflare Vibesdk bot"
# Create directory for error monitoring system
RUN mkdir -p /workspace/container /workspace/data
# Copy the process monitoring system
COPY container/ /workspace/container/
# Expose the ports you want to expose
# Install dependencies for the monitoring system
WORKDIR /workspace/container
RUN bun install && bun run build
# Make scripts executable
RUN chmod +x /workspace/container/cli-tools.ts
# Ensure bunx is available (should be included with bun)
RUN which bunx || ln -sf $(which bun) /usr/local/bin/bunx
# Install tsc via bunx
RUN bunx tsc --version
# Create symlinks for easier CLI usage
RUN ln -sf /workspace/container/cli-tools.ts /usr/local/bin/monitor-cli
# # Setup common templates packages cache
# WORKDIR /app/container/packages-cache
# ENV BUN_INSTALL_CACHE_DIR=/app/container/packages-cache
# RUN bun install
# Set proper permissions for data directory
RUN chmod 755 /workspace/data
# Set environment variable to indicate Docker container environment
ENV CONTAINER_ENV=docker
ENV VITE_LOGGER_TYPE=json
# # Set environment variable to indicate Docker container environment
# ENV CONTAINER_ENV=docker
# # Reset workdir
WORKDIR /container-server
EXPOSE 3000
# Use startup script
CMD ["./startup.sh"]