Trying to sandbox Claude into Apple container and run but encounter error. Any suggestions? #1330
Unanswered
champlain007
asked this question in
Q&A
Replies: 1 comment
-
|
Following your steps, I noticed I would get the same errors. Feel free to use my script, if you would like. Instructions:
(I chose the name of my container to be 'claude' for brevity. Feel free to name the container whatever you want.) #!/bin/zsh
# Ensure container system is running (no-op if already started)
container system start 2>/dev/null || true
# Check if container already exists
EXISTS=$(container ls -a 2>/dev/null | grep -w claude || true)
if [ -n "$EXISTS" ]; then
container start claude 2>/dev/null || true
exec container exec -it claude /bin/bash
fi
echo "Pulling base image..."
container image pull docker/sandbox-templates:claude-code
# See more at https://github.com/apple/container/tree/main/docs
# Choose whatever DNS Gateway you prefer.
# My container cannot access Internet without changing default DNS (bug?).
echo "Creating container..."
container create -it \
--name claude \
--cpus 2 \
--memory 2g \
--dns 8.8.8.8 \
docker/sandbox-templates:claude-code
# Start the container with keep stdin open and active TTY process options.
container start claude && container exec -it claude /bin/bash |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
% docker sandbox run claude
docker image is docker/sandbox-templates:claude-code on my machine
% docker save -o ClaudeSandbox.tar docker/sandbox-templates:claude-code
saves docker image as ClaudeSandbox.tar OCI image in my Projects folder
% container system start
% container image load -i ClaudeSandbox.tar
seems like it loads correctly however I get an error once I try to run
% container run docker/sandbox-templates:claude-code
Error: Input must be provided either through stdin or as a prompt argument when using --print
Any suggestions to get the container running (as I am not using --print therefore not thinking of passing it anything)?
Beta Was this translation helpful? Give feedback.
All reactions