-
Notifications
You must be signed in to change notification settings - Fork 348
Expand file tree
/
Copy pathcompose-secrets.yaml
More file actions
36 lines (35 loc) · 1.04 KB
/
compose-secrets.yaml
File metadata and controls
36 lines (35 loc) · 1.04 KB
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
# yaml-language-server: $schema=https://raw.githubusercontent.com/docker/docker-agent/main/agent-schema.json
#
# Example: Using Docker Compose secrets with docker-agent
#
# Docker Compose mounts secrets as files under /run/secrets/, and
# docker-agent reads from this location automatically.
#
# See the full guide: https://docker.github.io/docker-agent/guides/secrets/
#
# To run this example:
#
# echo -n "sk-ant-..." > .anthropic_api_key
# docker compose up
#
# compose.yaml:
#
# services:
# agent:
# image: docker/docker-agent
# command: run --exec /app/agent.yaml "Hello!"
# secrets:
# - ANTHROPIC_API_KEY
# volumes:
# - ./agent.yaml:/app/agent.yaml:ro
#
# secrets:
# ANTHROPIC_API_KEY:
# file: ./.anthropic_api_key
agents:
root:
model: anthropic/claude-sonnet-4-0
description: A helpful assistant running with Docker Compose secrets
instruction: |
You are a helpful assistant. Your API key was securely provided
via Docker Compose secrets mounted at /run/secrets/.