Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sandbox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# NOTE: Sensitive variables below are declared as empty strings for documentation.
# Actual values will be securely injected at runtime via Kubernetes Secrets.
# This is safe - no actual secrets are hardcoded in the Dockerfile.
ENV DEBIAN_FRONTEND=noninteractive \

Check warning on line 20 in sandbox/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Runtime Docker Images

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "ANTHROPIC_AUTH_TOKEN") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 20 in sandbox/Dockerfile

View workflow job for this annotation

GitHub Actions / Build Runtime Docker Images

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "DOCKER_HUB_PASSWD") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
NODE_VERSION=22.x \
CLAUDE_CODE_VERSION=latest \
PATH="/root/.local/bin:/home/fulling/.local/bin:$PATH" \
Expand Down Expand Up @@ -195,7 +195,7 @@
ttyd --version || true

# Set working directory for application
WORKDIR /home/fulling
WORKDIR /home/fulling/next

# -----------------------------------------------------------------------------
# Copy configuration files (placed before user switch for better caching)
Expand Down
18 changes: 9 additions & 9 deletions sandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ docker run -d \
docker run -d \
-p 7681:7681 \
-p 3000:3000 \
-v $(pwd)/workspace:/home/agent/workspace \
-v $(pwd)/workspace:/home/fulling/workspace \
-e ANTHROPIC_AUTH_TOKEN="your-token" \
ghcr.io/{owner}/fullstack-web-runtime:latest
```
Expand Down Expand Up @@ -264,16 +264,16 @@ When submitting changes:
- Container tools (Buildah, Podman)
- Development tools

**Stage 2: User Environment** (as agent user)
**Stage 2: User Environment** (as fulling user)
- Next.js project initialization
- shadcn/ui components installation
- User-specific configurations

### Runtime Configuration

- **User**: agent (UID 1001, GID 1001)
- **Home**: `/home/agent`
- **Working Directory**: `/home/agent/next` (auto-cd on shell start)
- **User**: fulling (UID 1001, GID 1001)
- **Home**: `/home/fulling`
- **Working Directory**: `/home/fulling/next` (auto-cd on shell start)
- **Shell**: bash with custom prompt
- **Entrypoint**: ttyd web terminal

Expand All @@ -282,13 +282,13 @@ When submitting changes:
- **Driver**: VFS (for compatibility)
- **Runtime**: crun
- **Cgroup Manager**: cgroupfs
- **Storage Root**: `/home/agent/.local/share/containers/storage`
- **Storage Root**: `/home/fulling/.local/share/containers/storage`

## Security Considerations

### Container Security
1. **Non-Root User**: Runs as `agent` user (UID 1001)
2. **Sudo Access**: Agent has passwordless sudo for development flexibility
1. **Non-Root User**: Runs as `fulling` user (UID 1001)
2. **Sudo Access**: fulling has passwordless sudo for development flexibility
3. **Rootless Containers**: Buildah/Podman configured for rootless operation

### Network Security
Expand Down Expand Up @@ -362,7 +362,7 @@ docker exec <container-id> which claude

**Problem**: Buildah permission denied
```bash
# Ensure running as agent user
# Ensure running as fulling user
docker exec <container-id> whoami

# Check storage configuration
Expand Down