I am trying to build e2b from template
# Custom E2B Sandbox Template with S3 Integration
# Base image is required - only Debian-based images are supported
FROM e2bdev/code-interpreter:latest
# Accept build arguments for AWS credentials
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG AWS_REGION=us-west-2
ARG S3_BUCKET_NAME
# Set environment variables from build args
ENV AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
ENV AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
ENV AWS_REGION=${AWS_REGION}
ENV S3_BUCKET_NAME=${S3_BUCKET_NAME}
# Update package list
RUN apt-get update
# Install S3 filesystem tools and utilities
RUN apt-get install -y \
s3fs \
awscli \
curl \
wget \
fuse \
jq \
git \
vim \
htop \
&& rm -rf /var/lib/apt/lists/*
# Install goofys for high-performance S3 mounting
RUN curl -L https://github.com/kahing/goofys/releases/latest/download/goofys -o /usr/local/bin/goofys \
&& chmod +x /usr/local/bin/goofys
# Install only additional packages not pre-installed in E2B code interpreter
RUN pip install --no-cache-dir \
boto3 \
python-dotenv \
pyarrow \
fastparquet
# Create necessary directories
RUN mkdir -p /s3-data /workspace /tmp/artifacts
# Set up proper permissions for FUSE
RUN echo "user_allow_other" >> /etc/fuse.conf
# Copy startup script to a location accessible by user
COPY startup.sh /usr/local/bin/startup.sh
# Make script executable for all users
RUN chmod +x /usr/local/bin/startup.sh
# Note: E2B will run startup.sh via the start_cmd in e2b.toml
# No systemd setup needed - E2B handles container initialization differently
# Set workspace as working directory
WORKDIR /workspace
# This is a config for E2B sandbox template.
# You can use template ID (5efyoklxeppejs2prlu4) or template name (sentient-e2b-s3) to create a sandbox:
# Python SDK
# from e2b import Sandbox, AsyncSandbox
# sandbox = Sandbox("sentient-e2b-s3") # Sync sandbox
# sandbox = await AsyncSandbox.create("sentient-e2b-s3") # Async sandbox
# JS SDK
# import { Sandbox } from 'e2b'
# const sandbox = await Sandbox.create('sentient-e2b-s3')
team_id = "10c72e9b-7c76-4dce-b9cf-815a783fcf8e"
start_cmd = "startup.sh"
dockerfile = "e2b.Dockerfile"
template_name = "sentient-e2b-s3"
template_id = "5efyoklxeppejs2prlu4"
Startup script etc running properly but still I receive
Error executing code: {"sandboxId":"idqbbkxbbanwbejb1jdi1","message":"The sandbox is
running but port is not open","port":49999,"code":502}: This error is likely due to sandbox timeout. You can modify the
sandbox timeout by passing 'timeout' when starting the sandbox or calling '.set_timeout' on the sandbox with the desired
timeout.
I am trying to build e2b from template
Startup script etc running properly but still I receive