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
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,6 @@ FROM scratch AS cross
COPY --from=builder /binaries .

FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
RUN apk add --no-cache curl socat
COPY --from=build-agent /agent /
ENTRYPOINT [ "/agent" ]
COPY --from=build-agent /agent /cagent
RUN mkdir /data
ENTRYPOINT ["/cagent"]
1 change: 1 addition & 0 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ tasks:
- go build -ldflags "{{.LDFLAGS}}" -o {{.BUILD_DIR}}/{{.BINARY_NAME}} {{.MAIN_PKG}}
sources:
- "{{.GO_SOURCES}}"
- "**/*.template"
- "**/*.txt"
- "go.mod"
- "go.sum"
Expand Down
18 changes: 6 additions & 12 deletions pkg/oci/Dockerfile.template
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
# syntax=docker/dockerfile:1
FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1

RUN adduser -D cagent
ADD https://github.com/docker/cagent/releases/download/v1.0.9/cagent-linux-arm64 /cagent
RUN chmod +x /cagent
RUN cat <<EOF > /agent.yaml
{{ .AgentConfig }}
EOF
RUN chmod +r /agent.yaml && mkdir /data && chmod 777 -R /data
USER cagent
ENTRYPOINT ["/cagent"]
CMD ["api", "--session-db", "/data/session.db", "/agent.yaml"]

FROM docker/cagent
LABEL com.docker.agent.packaging.version="v0.0.1"
LABEL com.docker.agent.runtime="cagent"
LABEL org.opencontainers.image.description="{{ .Description }}"
LABEL org.opencontainers.image.licenses="{{ .Licenses }}"
LABEL com.docker.agent.mcp-servers="{{ .McpServers }}"
LABEL com.docker.agent.models="{{ .Models }}"
VOLUME /data
CMD ["api", "--session-db", "/data/session.db", "/agent.yaml"]
RUN cat <<EOF >/agent.yaml
{{ .AgentConfig }}
EOF