Skip to content

Commit 490361d

Browse files
committed
fix: 修复Docker配置文件权限问题并添加CI验证
- Dockerfile: 添加chmod确保/opt/claude-config可读 - 添加GitHub Actions验证Docker构建和文件权限 - 从Git追踪中移除.aws-sam/build.toml
1 parent f9566ec commit 490361d

3 files changed

Lines changed: 40 additions & 21 deletions

File tree

.aws-sam/build.toml

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Docker Build Validation
2+
3+
on:
4+
push:
5+
paths:
6+
- 'agent-sdk-server/Dockerfile'
7+
pull_request:
8+
paths:
9+
- 'agent-sdk-server/Dockerfile'
10+
11+
jobs:
12+
validate-docker:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
17+
- name: Build and validate file permissions
18+
run: |
19+
cd agent-sdk-server
20+
docker build -t agent-sdk-server:test .
21+
22+
# Simulate Lambda init - copy from /opt to /tmp
23+
docker run --rm agent-sdk-server:test python -c "
24+
import shutil
25+
from pathlib import Path
26+
27+
src = Path('/opt/claude-config')
28+
dst = Path('/tmp/.claude-code')
29+
dst.mkdir(exist_ok=True)
30+
31+
for item in src.iterdir():
32+
target = dst / item.name
33+
if item.is_dir():
34+
shutil.copytree(item, target, dirs_exist_ok=True)
35+
else:
36+
shutil.copy2(item, target)
37+
38+
print('Lambda init simulation: OK')
39+
"

agent-sdk-server/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ RUN chmod 644 *.py
1616
# Copy config files (MCP servers, SubAgents) to /opt (read-only at runtime)
1717
# setup_lambda_environment() will copy to /tmp/.claude-code at runtime
1818
COPY claude-config/ /opt/claude-config/
19+
RUN chmod -R 755 /opt/claude-config/
1920

2021
# Create ~/.claude and ~/.aws directories and ensure writable
2122
RUN mkdir -p /root/.claude/projects /root/.claude/debug /root/.claude/todos /root/.aws && \

0 commit comments

Comments
 (0)