mirror of
https://github.com/droidrun/droidrun.git
synced 2026-05-23 07:40:37 +00:00
feat: added docker support
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
*
|
||||
|
||||
!droidrun
|
||||
!pyproject.toml
|
||||
!README.md
|
||||
@@ -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
@@ -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"]
|
||||
Reference in New Issue
Block a user