Skip to content

Commit 9736367

Browse files
committed
fix: align container UID with host and fix artifact permission issues
1 parent 8e996a9 commit 9736367

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4242
netcat-openbsd \
4343
&& rm -rf /var/lib/apt/lists/*
4444

45-
# Create non-root user for security
46-
RUN groupadd -r app && useradd -r -g app app
45+
# Create non-root user for security (matching common host UID 1000)
46+
RUN groupadd -g 1000 app && \
47+
useradd -u 1000 -g app -s /bin/sh -m app
4748

4849
# Set working directory
4950
WORKDIR /app
5051

52+
# Pre-create the artifacts directory and set ownership
53+
RUN mkdir -p /app/src/.adk/artifacts && chown -R app:app /app
54+
5155
# Copy application and virtual environment from builder
5256
COPY --from=builder --chown=app:app /app .
5357

compose.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ services:
1414
# DATABASE_URL and API Keys will be loaded from the .env file
1515
env_file:
1616
- .env
17-
# Volumes are for hot-reloading during development.
18-
# For production, remove these volumes to use the immutable code from the image.
17+
# Volumes are for hot-reloading and persisting artifacts.
1918
volumes:
2019
- ./src:/app/src
21-
# restart: always # Uncomment for production to auto-restart
20+
restart: always
2221
command: python -m agent_foundation.server

0 commit comments

Comments
 (0)