-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (29 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
37 lines (29 loc) · 1.18 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
FROM docker.io/cloudflare/sandbox:0.7.0
# Install Node.js 22 and rsync (for R2 backup sync)
# The base image has Node 20, we need to replace it with Node 22
ENV NODE_VERSION=22.13.1
RUN apt-get update && apt-get install -y xz-utils ca-certificates rsync sqlite3 \
&& curl -fsSLk https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz -o /tmp/node.tar.xz \
&& tar -xJf /tmp/node.tar.xz -C /usr/local --strip-components=1 \
&& rm /tmp/node.tar.xz \
&& node --version \
&& npm --version
# Install pnpm globally
RUN npm install -g pnpm
# Install stateset CLI (includes all optional deps for channels)
RUN npm install -g @stateset/cli \
&& stateset --version
# Create stateset directories
RUN mkdir -p /root/.stateset \
&& mkdir -p /root/.stateset-templates \
&& mkdir -p /root/stateset \
&& mkdir -p /root/stateset/data
# Copy startup script
COPY start-stateset.sh /usr/local/bin/start-stateset.sh
RUN chmod +x /usr/local/bin/start-stateset.sh
# Copy default configuration template
COPY stateset.json.template /root/.stateset-templates/stateset.json.template
# Set working directory
WORKDIR /root/stateset
# Expose the gateway port
EXPOSE 8080