feat: added docker support

This commit is contained in:
Jean LESUR
2025-11-01 00:00:56 +01:00
parent 1cecd4a864
commit d6d5bfd773
3 changed files with 85 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
*
!droidrun
!pyproject.toml
!README.md
+54
View File
@@ -0,0 +1,54 @@
name: Publish Docker Image 🐳
on:
push:
tags:
- "v*"
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
push-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push multi-arch Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+26
View File
@@ -0,0 +1,26 @@
FROM python:3.12.12
RUN groupadd -g 1000 droidrun \
&& useradd -m -u 1000 -g 1000 -s /bin/bash droidrun
RUN apt-get update && \
apt-get install -y --no-install-recommends \
android-tools-adb \
&& rm -rf /var/lib/apt/lists/*
USER droidrun
WORKDIR /droidrun
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV PATH="/home/droidrun/.local/bin:${PATH}"
COPY . .
RUN uv venv && \
uv pip install .[google,anthropic,openai,deepseek,ollama,openrouter]
ENTRYPOINT [".venv/bin/droidrun"]
CMD ["setup"]