Skip to content

Commit 0042cc9

Browse files
committed
github actions workflow to pubslih agent image t GHCR added, and prod compose file added to expose localhost to only access the agent container and competey restrict the ollama service and dockerfile for agent updated
1 parent 99ab849 commit 0042cc9

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Build and publish agent image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "agent/**"
9+
- ".github/workflows/docker-publish.yml"
10+
workflow_dispatch:
11+
12+
env:
13+
REGISTRY: ghcr.io
14+
IMAGE_NAME: ghcr.io/${{ github.repository_owner }}/local-code-agent
15+
16+
jobs:
17+
build-and-push:
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
23+
steps:
24+
- name: Checkout repository
25+
uses: actions/checkout@v4
26+
27+
- name: Set up Docker Buildx
28+
uses: docker/setup-buildx-action@v3
29+
30+
- name: Log in to GHCR
31+
uses: docker/login-action@v3
32+
with:
33+
registry: ${{ env.REGISTRY }}
34+
username: ${{ github.actor }}
35+
password: ${{ secrets.GITHUB_TOKEN }}
36+
37+
- name: Extract Docker metadata
38+
id: meta
39+
uses: docker/metadata-action@v5
40+
with:
41+
images: ${{ env.IMAGE_NAME }}
42+
tags: |
43+
type=raw,value=latest
44+
type=sha
45+
46+
- name: Build and push agent image
47+
uses: docker/build-push-action@v6
48+
with:
49+
context: ./agent
50+
file: ./agent/Dockerfile
51+
push: true
52+
tags: ${{ steps.meta.outputs.tags }}
53+
labels: ${{ steps.meta.outputs.labels }}

agent/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
FROM debian:bookworm-slim
22

3+
LABEL org.opencontainers.image.source="https://github.com/himmat12/local-coding-agent"
4+
LABEL org.opencontainers.image.name="local-coding-agent"
5+
LABEL org.opencontainers.image.description="A Docker-based local coding agent that runs an Ollama model container and a Python agent container. The agent connects to Ollama over an internal bridge network and provides an interactive terminal experience."
6+
LABEL org.opencontainers.image.licenses="MIT"
7+
38
ENV DEBIAN_FRONTEND=noninteractive \
49
PYTHONDONTWRITEBYTECODE=1 \
510
PYTHONUNBUFFERED=1 \

docker-compose.prod.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
services:
2+
ollama:
3+
ports: []
4+
5+
agent:
6+
image: ghcr.io/himmat12/local-code-agent:latest
7+
ports:
8+
- "127.0.0.1:8000:8000"

0 commit comments

Comments
 (0)