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
3 changes: 2 additions & 1 deletion docs/container-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ app/MyAgent/

## Generated Dockerfile

The template uses `ghcr.io/astral-sh/uv:python3.12-bookworm-slim` as the base image with these design choices:
The template uses `public.ecr.aws/docker/library/python:3.12-slim` as the base image (with `uv` installed via
`pip install uv`) with these design choices:

- **Layer caching**: Dependencies (`pyproject.toml`) are installed before copying application code
- **Non-root**: Runs as `bedrock_agentcore` (UID 1000)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html

exports[`Dockerfile enableOtel rendering > renders opentelemetry-instrument CMD when enableOtel is true > Dockerfile-enableOtel-true 1`] = `
"FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
"FROM public.ecr.aws/docker/library/python:3.12-slim-bookworm

RUN pip install --no-cache-dir uv

ARG UV_DEFAULT_INDEX
ARG UV_INDEX
Expand Down Expand Up @@ -39,7 +41,9 @@ CMD ["opentelemetry-instrument", "python", "-m", "main"]
`;

exports[`Dockerfile enableOtel rendering > renders plain python CMD when enableOtel is false > Dockerfile-enableOtel-false 1`] = `
"FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
"FROM public.ecr.aws/docker/library/python:3.12-slim-bookworm

RUN pip install --no-cache-dir uv

ARG UV_DEFAULT_INDEX
ARG UV_INDEX
Expand Down
4 changes: 3 additions & 1 deletion src/assets/container/python/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
FROM public.ecr.aws/docker/library/python:3.12-slim-bookworm

RUN pip install --no-cache-dir uv

ARG UV_DEFAULT_INDEX
ARG UV_INDEX
Expand Down
3 changes: 2 additions & 1 deletion src/cli/commands/import/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,8 @@ export async function handleImport(options: ImportOptions): Promise<ImportResult
fs.writeFileSync(
destDockerfile,
[
'FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim',
'FROM public.ecr.aws/docker/library/python:3.12-slim-bookworm',
'RUN pip install --no-cache-dir uv',
'WORKDIR /app',
'',
'ENV UV_SYSTEM_PYTHON=1 \\',
Expand Down
Loading