diff --git a/.github/workflows/beta.yml b/.github/workflows/beta.yml index a4a1eb0..49dc878 100644 --- a/.github/workflows/beta.yml +++ b/.github/workflows/beta.yml @@ -4,27 +4,42 @@ on: push: branches: - 'beta' + workflow_dispatch: +env: + IMAGE: toddrob/searcharr jobs: docker: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - + uses: actions/checkout@v2 - name: Login to DockerHub uses: docker/login-action@v2 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - + - if: startsWith(github.ref, 'refs/heads/master') + run: echo "TAG=latest" >> $GITHUB_ENV + - if: startsWith(github.ref, 'refs/tags') + run: echo "TAG=$(git describe --tags)" >> $GITHUB_ENV + - name: upgrade apt packages.. + run: sudo apt-get update -y && sudo apt-get upgrade -y + # https://github.com/docker/setup-qemu-action + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + # https://github.com/docker/setup-buildx-action + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v2 + + - name: Build and push uses: docker/build-push-action@v3 with: - platforms: linux/amd64,linux/arm64,linux/arm/v7 + context: ./ + file: ./Dockerfile push: true - tags: toddrob/searcharr:beta + platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm64/v8 + tags: toddrob/searcharr:latest diff --git a/Dockerfile b/Dockerfile index 9fd31c8..371e587 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,25 @@ -FROM python:3.11-slim-buster +FROM python:slim + +LABEL org.opencontainers.image.source="https://github.com/toddrob99/searcharr" +LABEL org.opencontainers.image.description="Docker for SEARCHARR" +LABEL Name=Searcharr Version="v1.2" + +ARG TARGETPLATFORM BUILDPLATFORM -LABEL Name=Searcharr Version=1.2 WORKDIR /app + +RUN chmod -R 777 /app && \ + chmod -R +x /app && \ + chmod -R 705 /app + ADD . /app -RUN python3 -m pip install --upgrade pip -RUN python3 -m pip install -r requirements.txt +RUN apt-get update -y && \ + apt-get upgrade -y + +RUN python3 -m pip install --upgrade pip && \ + python3 -m pip install -r requirements.txt && \ + apt-get autoremove -y CMD ["python3", "searcharr.py"] diff --git a/docker-compose.yml b/docker-compose.yml index d89f6f9..f9d0bcc 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.0' services: searcharr: container_name: searcharr - image: toddrob/searcharr:latest + build: . volumes: - ./data:/app/data - ./logs:/app/logs