diff --git a/.gitignore b/.gitignore index c953163b..47d7a5b4 100644 --- a/.gitignore +++ b/.gitignore @@ -254,7 +254,6 @@ node_modules Test-Downloads/ ### Docker ### -Dockerfile .dockerignore 01-tutorials/03-AgentCore-identity/07-Outbound_Auth_3LO_ECS_Fargate/backend/runtime/requirements.txt 01-tutorials/03-AgentCore-identity/07-Outbound_Auth_3LO_ECS_Fargate/backend/session_binding/requirements.txt diff --git a/01-tutorials/01-AgentCore-runtime/12-coding-agents/01-claude-code-with-s3-files/Dockerfile b/01-tutorials/01-AgentCore-runtime/12-coding-agents/01-claude-code-with-s3-files/Dockerfile new file mode 100644 index 00000000..02fa81d9 --- /dev/null +++ b/01-tutorials/01-AgentCore-runtime/12-coding-agents/01-claude-code-with-s3-files/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22-slim + +RUN apt-get update && apt-get install -y --no-install-recommends git curl ca-certificates && \ + rm -rf /var/lib/apt/lists/* +RUN npm install -g @anthropic-ai/claude-code + +RUN userdel -r node && \ + useradd -m -d /home/agent -u 1000 agent && \ + git config --global user.name "AgentCore Bot" && \ + git config --global user.email "agentcore@company.com" + +COPY --chown=agent:agent server.js /app/server.js + +ENV CLAUDE_CODE_USE_BEDROCK=1 +WORKDIR /app +EXPOSE 8080 +USER agent +CMD ["node", "/app/server.js"] diff --git a/01-tutorials/01-AgentCore-runtime/12-coding-agents/01-claude-code-with-s3-files/runtime_config.json b/01-tutorials/01-AgentCore-runtime/12-coding-agents/01-claude-code-with-s3-files/runtime_config.json deleted file mode 100644 index b075d0b2..00000000 --- a/01-tutorials/01-AgentCore-runtime/12-coding-agents/01-claude-code-with-s3-files/runtime_config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "agent_name": "claude_code_89491", - "runtime_id": "claude_code_89491-F84ySyFzSd", - "runtime_arn": "arn:aws:bedrock-agentcore:us-east-1:623129719707:runtime/claude_code_89491-F84ySyFzSd", - "region": "us-east-1", - "ecr_uri": "623129719707.dkr.ecr.us-east-1.amazonaws.com/agentcore-claude-code:claude_code_89491", - "s3files_access_point_arn": "arn:aws:s3files:us-east-1:623129719707:file-system/fs-0c276db1ba6347ec1/access-point/fsap-0e1b5d94dab8da3db", - "s3files_mount_path": "/mnt/s3files" -} \ No newline at end of file diff --git a/01-tutorials/01-AgentCore-runtime/12-coding-agents/02-claude-code-with-efs/Dockerfile b/01-tutorials/01-AgentCore-runtime/12-coding-agents/02-claude-code-with-efs/Dockerfile new file mode 100644 index 00000000..02fa81d9 --- /dev/null +++ b/01-tutorials/01-AgentCore-runtime/12-coding-agents/02-claude-code-with-efs/Dockerfile @@ -0,0 +1,18 @@ +FROM node:22-slim + +RUN apt-get update && apt-get install -y --no-install-recommends git curl ca-certificates && \ + rm -rf /var/lib/apt/lists/* +RUN npm install -g @anthropic-ai/claude-code + +RUN userdel -r node && \ + useradd -m -d /home/agent -u 1000 agent && \ + git config --global user.name "AgentCore Bot" && \ + git config --global user.email "agentcore@company.com" + +COPY --chown=agent:agent server.js /app/server.js + +ENV CLAUDE_CODE_USE_BEDROCK=1 +WORKDIR /app +EXPOSE 8080 +USER agent +CMD ["node", "/app/server.js"] diff --git a/01-tutorials/01-AgentCore-runtime/12-coding-agents/02-claude-code-with-efs/runtime_config.json b/01-tutorials/01-AgentCore-runtime/12-coding-agents/02-claude-code-with-efs/runtime_config.json deleted file mode 100644 index b0d3c1c9..00000000 --- a/01-tutorials/01-AgentCore-runtime/12-coding-agents/02-claude-code-with-efs/runtime_config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "agent_name": "claude_code_02701", - "runtime_id": "claude_code_02701-zr5JYsBhVr", - "runtime_arn": "arn:aws:bedrock-agentcore:us-east-1:623129719707:runtime/claude_code_02701-zr5JYsBhVr", - "region": "us-east-1", - "ecr_uri": "623129719707.dkr.ecr.us-east-1.amazonaws.com/agentcore-claude-code:claude_code_02701", - "efs_access_point_arn": "arn:aws:elasticfilesystem:us-east-1:623129719707:access-point/fsap-0121c98f6d9fae8f8", - "efs_mount_path": "/mnt/efs" -} \ No newline at end of file