sandboxbox 1.2.0 → 1.2.2
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/Dockerfile +80 -24
- package/Dockerfile.test +16 -0
- package/bin/bwrap +0 -0
- package/build-final.log +2217 -0
- package/build-output.log +289 -0
- package/cli.js +4 -2
- package/complete-build.log +231 -0
- package/container.js +402 -26
- package/final-build.log +268 -0
- package/final-complete-build.log +240 -0
- package/full-build.log +234 -0
- package/init-firewall.sh +36 -0
- package/npm-build-test.log +410 -0
- package/package.json +1 -1
- package/sandboxbox-sandbox/build.sh +83 -0
package/Dockerfile
CHANGED
@@ -1,39 +1,95 @@
|
|
1
|
-
FROM
|
1
|
+
FROM node:20
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
ARG TZ
|
4
|
+
ENV TZ="$TZ"
|
5
5
|
|
6
|
-
|
6
|
+
ARG CLAUDE_CODE_VERSION=latest
|
7
7
|
|
8
|
-
|
9
|
-
RUN
|
8
|
+
# Install basic development tools and iptables/ipset
|
9
|
+
RUN apt-get update && apt-get install -y --no-install-recommends \
|
10
|
+
less \
|
11
|
+
git \
|
12
|
+
procps \
|
13
|
+
sudo \
|
14
|
+
fzf \
|
15
|
+
zsh \
|
16
|
+
man-db \
|
17
|
+
unzip \
|
18
|
+
gnupg2 \
|
19
|
+
gh \
|
20
|
+
iptables \
|
21
|
+
ipset \
|
22
|
+
iproute2 \
|
23
|
+
dnsutils \
|
24
|
+
aggregate \
|
25
|
+
jq \
|
26
|
+
nano \
|
27
|
+
vim \
|
28
|
+
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
10
29
|
|
11
|
-
#
|
30
|
+
# Ensure default node user has access to /usr/local/share
|
31
|
+
RUN mkdir -p /usr/local/share/npm-global && \
|
32
|
+
chown -R node:node /usr/local/share
|
12
33
|
|
13
|
-
|
14
|
-
RUN apt-get update && apt-get install -y \
|
15
|
-
postgresql-client nodejs npm curl sudo neovim direnv supervisor
|
34
|
+
ARG USERNAME=node
|
16
35
|
|
17
|
-
#
|
18
|
-
RUN
|
36
|
+
# Persist bash history.
|
37
|
+
RUN SNIPPET="export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
|
38
|
+
&& mkdir -p /commandhistory \
|
39
|
+
&& touch /commandhistory/.bash_history \
|
40
|
+
&& chown -R $USERNAME /commandhistory
|
19
41
|
|
20
|
-
|
42
|
+
# Set `DEVCONTAINER` environment variable to help with orientation
|
43
|
+
ENV DEVCONTAINER=true
|
44
|
+
|
45
|
+
# Create workspace and config directories and set permissions
|
46
|
+
RUN mkdir -p /workspace /home/node/.claude && \
|
47
|
+
chown -R node:node /workspace /home/node/.claude
|
48
|
+
|
49
|
+
WORKDIR /workspace
|
21
50
|
|
22
|
-
|
51
|
+
ARG GIT_DELTA_VERSION=0.18.2
|
52
|
+
RUN ARCH=$(dpkg --print-architecture) && \
|
53
|
+
wget "https://github.com/dandavison/delta/releases/download/${GIT_DELTA_VERSION}/git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \
|
54
|
+
sudo dpkg -i "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb" && \
|
55
|
+
rm "git-delta_${GIT_DELTA_VERSION}_${ARCH}.deb"
|
23
56
|
|
24
|
-
|
57
|
+
# Set up non-root user
|
58
|
+
USER node
|
25
59
|
|
26
|
-
|
60
|
+
# Install global packages
|
61
|
+
ENV NPM_CONFIG_PREFIX=/usr/local/share/npm-global
|
62
|
+
ENV PATH=$PATH:/usr/local/share/npm-global/bin
|
27
63
|
|
28
|
-
|
29
|
-
|
30
|
-
RUN echo 'export PATH="/usr/local/share/pnpm/global/bin:$PATH"' | tee -a /etc/bash.bashrc
|
64
|
+
# Set the default shell to zsh rather than sh
|
65
|
+
ENV SHELL=/bin/zsh
|
31
66
|
|
32
|
-
|
67
|
+
# Set the default editor and visual
|
68
|
+
ENV EDITOR=nano
|
69
|
+
ENV VISUAL=nano
|
33
70
|
|
34
|
-
|
71
|
+
# Default powerline10k theme
|
72
|
+
ARG ZSH_IN_DOCKER_VERSION=1.2.0
|
73
|
+
RUN sh -c "$(wget -O- https://github.com/deluan/zsh-in-docker/releases/download/v${ZSH_IN_DOCKER_VERSION}/zsh-in-docker.sh)" -- \
|
74
|
+
-p git \
|
75
|
+
-p fzf \
|
76
|
+
-a "source /usr/share/doc/fzf/examples/key-bindings.zsh" \
|
77
|
+
-a "source /usr/share/doc/fzf/examples/completion.zsh" \
|
78
|
+
-a "export PROMPT_COMMAND='history -a' && export HISTFILE=/commandhistory/.bash_history" \
|
79
|
+
-x
|
35
80
|
|
36
|
-
# Install
|
37
|
-
RUN
|
81
|
+
# Install Claude
|
82
|
+
RUN npm install -g @anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}
|
83
|
+
|
84
|
+
# Install playwright deps
|
85
|
+
RUN npx --yes playwright install-deps
|
86
|
+
|
87
|
+
RUN npm i -g @playwright/mcp
|
38
88
|
|
39
|
-
|
89
|
+
# Copy and set up firewall script
|
90
|
+
COPY init-firewall.sh /usr/local/bin/
|
91
|
+
USER root
|
92
|
+
RUN chmod +x /usr/local/bin/init-firewall.sh && \
|
93
|
+
echo "node ALL=(root) NOPASSWD: /usr/local/bin/init-firewall.sh" > /etc/sudoers.d/node-firewall && \
|
94
|
+
chmod 0440 /etc/sudoers.d/node-firewall
|
95
|
+
USER node
|
package/Dockerfile.test
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
FROM ubuntu:24.04
|
2
|
+
|
3
|
+
# Set environment variables
|
4
|
+
ENV NODE_ENV=production
|
5
|
+
ENV APP_DIR=/app
|
6
|
+
|
7
|
+
# Create a simple test directory
|
8
|
+
WORKDIR /app
|
9
|
+
|
10
|
+
# Simple commands that don't require root
|
11
|
+
RUN echo "Building container..."
|
12
|
+
RUN echo "Node environment: $NODE_ENV"
|
13
|
+
RUN mkdir -p data logs
|
14
|
+
|
15
|
+
# Default command
|
16
|
+
CMD ["/bin/bash"]
|
package/bin/bwrap
ADDED
Binary file
|