Skip to content

Commit

Permalink
Merge pull request #34 from TaylorTWBrown/update-2024
Browse files Browse the repository at this point in the history
Update Dockerfile and Actions
  • Loading branch information
vsc55 authored Aug 15, 2024
2 parents 91f8db8 + 117605e commit 8ab9424
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 32 deletions.
33 changes: 15 additions & 18 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ name: ci

on:
push:
branches:
- 'master'
tags:
- '*.*.*'
- '*.*.*_*.*.*'

jobs:

Expand All @@ -16,27 +11,29 @@ jobs:
steps:
- name: Set up Docker Buildx
id: build
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ github.repository_owner }}
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
push: true
platforms: linux/amd64
tags: |
${{ github.repository_owner }}/ombi_sqlite_mysql:${{ github.ref_name }}
${{ github.repository_owner }}/ombi_sqlite_mysql:latest
${{ secrets.DOCKERHUB_USERNAME }}/ombi_sqlite_mysql:${{ github.ref_name }}
${{ secrets.DOCKERHUB_USERNAME }}/ombi_sqlite_mysql:latest
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/ombi_sqlite_mysql:${{ github.ref_name }}
ghcr.io/${{ secrets.DOCKERHUB_USERNAME }}/ombi_sqlite_mysql:latest
build_args: OMBI_VER=${{ github.ref_name }}






33 changes: 19 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,32 @@
FROM --platform=$BUILDPLATFORM debian:11.3
# FROM debian:11.3
FROM --platform=$BUILDPLATFORM debian:12.6
# FROM debian:12.6

LABEL version="1.0" maintainer="[email protected]" description="Docker Ombi Data Base Migration Tools"

RUN \
apt-get update && \
apt-get install -y python3 python3-pip libmariadb-dev git libicu-dev && \
pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir mysqlclient packaging && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/
apt-get update && \
apt-get install -y python3 python3-pip libmariadb-dev git libicu-dev python3-venv pkg-config && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}/

# Create a virtual environment
RUN python3 -m venv /opt/venv

# Activate the virtual environment and install Python packages
RUN /opt/venv/bin/pip install --no-cache-dir --upgrade pip && \
/opt/venv/bin/pip install --no-cache-dir mysqlclient packaging

# Ensure the virtual environment is activated for subsequent commands
ENV PATH="/opt/venv/bin:$PATH"

WORKDIR /
COPY --chown=root:root /rootfs /

WORKDIR /opt/ombi_sqlite_mysql
COPY --chown=root:root ["ombi_sqlite2mysql.py", "ombi_sqlite2mysql_multi.py", "./"]

#Fix, hub.docker.com auto buils
# Fix, hub.docker.com auto builds
RUN chmod +x /opt/ombi_sqlite_mysql/*.py /opt/ombi_sqlite_mysql/*.sh

ENV HTTP_PORT=5000

VOLUME ["/config", "/opt/ombi"]
EXPOSE ${HTTP_PORT}/tcp
ENV HTTP_PORT=5000

0 comments on commit 8ab9424

Please sign in to comment.