File size: 1,389 Bytes
517919c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# syntax=docker/dockerfile:1
# Bedrock AgentCore Runtime image (linux/arm64). Build from monorepo root:
#   docker build --platform linux/arm64 -f agent-redact/agentcore/Dockerfile.runtime .
#
# AgentCore requires arm64, port 8080, POST /invocations and GET /ping
# (provided by BedrockAgentCoreApp in entrypoint.py).

FROM --platform=linux/arm64 public.ecr.aws/docker/library/python:3.12.13-slim-trixie

ENV DEBIAN_FRONTEND=noninteractive
ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV APP_TYPE=agent
ENV APP_HOME=/app
ENV PYTHONPATH=${APP_HOME}:${APP_HOME}/agent-redact:${APP_HOME}/agent-redact/shared:${APP_HOME}/agent-redact/pi:${APP_HOME}/agent-redact/agentcore
ENV AGENT_WORKSPACE_DIR=/tmp/agentcore-workspace
ENV AWS_REGION=eu-west-2
ENV AWS_DEFAULT_REGION=${AWS_REGION}

RUN apt-get update && apt-get install -y --no-install-recommends \
    ca-certificates \
    && apt-get clean && rm -rf /var/lib/apt/lists/*

WORKDIR ${APP_HOME}

COPY agent-redact/requirements_agent.txt /tmp/requirements_agent.txt
RUN pip install --no-cache-dir -r /tmp/requirements_agent.txt \
    && rm /tmp/requirements_agent.txt

COPY agent-redact/ ${APP_HOME}/agent-redact/
COPY config/agent.env.example ${APP_HOME}/config/agent.env.example

RUN mkdir -p /tmp/agentcore-workspace \
    && chmod 1777 /tmp/agentcore-workspace

EXPOSE 8080

CMD ["python", "agent-redact/agentcore/entrypoint.py"]