Skip to content

Commit

Permalink
ARM Docker Build Update
Browse files Browse the repository at this point in the history
Update to docker build files for ripper and UI
UI made smaller
Ripper resolved issues with the build
  • Loading branch information
microtechno9000 committed Dec 10, 2024
1 parent 973c01c commit 9ffcb43
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 31 deletions.
17 changes: 12 additions & 5 deletions Dockerfile-Ripper
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
# arm-dependencies
###########################################################

###########################################################
# TODO: create a base image with main packages
# add ripper to a base UI config/build
###########################################################

###########################################################
# Ripper - Dependencies - Part 1 - Update base image
###########################################################
Expand All @@ -24,7 +29,7 @@ RUN \
apt upgrade -y -o Dpkg::Options::="--force-confold"

###########################################################
# UI - Dependencies - Part 2 - Dependancies and config
# UI - Dependencies - Part 2 - Configure ARM user
###########################################################
# create an arm group(gid 1000) and an arm user(uid 1000), with password logon disabled
RUN groupadd -g 1000 arm \
Expand All @@ -36,6 +41,9 @@ RUN groupadd -g 1000 arm \
ENV ARM_UID=1000
ENV ARM_GID=1000

###########################################################
# UI - Dependencies - Part 3 - Install Applications
###########################################################
RUN install_clean \
git \
build-essential \
Expand All @@ -58,9 +66,9 @@ RUN install_clean \

# install python reqs
RUN pip3 install mysql-connector-python
COPY requirements.txt ./requirements.txt
COPY requirements_ripper.txt ./requirements_ripper.txt
RUN pip3 install --upgrade pip wheel setuptools psutil pyudev
RUN pip3 install --ignore-installed --prefer-binary -r ./requirements.txt
RUN pip3 install --ignore-installed --prefer-binary -r ./requirements_ripper.txt

# install deps for ripper
RUN install_clean \
Expand All @@ -80,8 +88,7 @@ RUN install_clean \
lsdvd

# install libdvd-pkg
RUN \
install_clean libdvd-pkg && \
RUN install_clean libdvd-pkg && \
dpkg-reconfigure libdvd-pkg

# install makemkv
Expand Down
47 changes: 26 additions & 21 deletions Dockerfile-UI
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,17 @@
# arm-dependencies
###########################################################

# TODO: fix Ubuntu Noble integration
# Fixes required
# - User 1000 removal [done]
# - Migrate python packages from pip to ubuntu pacakges, due to Ubuntu security updates
#FROM phusion/baseimage:noble-1.0.0 AS ui-deps


###########################################################
# UI - Dependencies - Part 1 - Update base image
###########################################################
# base image, used for build stages and final images
# noble doesn't work, not sure why
#FROM phusion/baseimage:noble-1.0.0 AS ui-deps
###########################################################
# TODO: fix before rolling into prod
###########################################################
FROM phusion/baseimage:jammy-1.0.4 AS ui-deps
RUN mkdir /opt/arm
WORKDIR /opt/arm
Expand All @@ -29,9 +31,15 @@ RUN \
apt upgrade -y -o Dpkg::Options::="--force-confold"

###########################################################
# UI - Dependencies - Part 2 - Dependancies and config
# UI - Dependencies - Part 2 - Configure ARM user
###########################################################
# create an arm group(gid 1000) and an arm user(uid 1000), with password logon disabled
# TODO: Fix this with the rest of Noble updates
# Remove the existing ubuntu uid 1000
#RUN touch /var/mail/ubuntu \
# && chown ubuntu /var/mail/ubuntu \
# && userdel -r ubuntu

# Create an arm group(gid 1000) and an arm user(uid 1000), with password logon disabled
RUN groupadd -g 1000 arm \
&& useradd -rm -d /home/arm -s /bin/bash -g arm -G video,cdrom -u 1000 arm

Expand All @@ -41,29 +49,27 @@ RUN groupadd -g 1000 arm \
ENV ARM_UID=1000
ENV ARM_GID=1000

###########################################################
# UI - Dependencies - Part 3 - Install Applications
###########################################################
# git - required for updates to the ARM UI from within
# wget - required for build scripts
# build-essential - required for pip3 installation of python packages
# python3 - ARM runs on python
# python3-dev - ARM runs on python
# python3-pip - ARM runs on python
# nano - usefull for debugging
# vim - debugging (as a Jedi Master)
# python3-dev - required for python packages
# python3-pip - required as the Python installer
# gosu - docker user manager
RUN install_clean \
git \
wget \
build-essential \
python3 \
python3-dev \
python3-pip \
nano \
vim \
gosu

# install python reqs
RUN pip3 install mysql-connector-python
# Install python packages
# Setuptools and wheel required to install some python packages
RUN pip3 install --upgrade pip setuptools wheel
COPY requirements_ui.txt ./requirements_ui.txt
RUN pip3 install --upgrade pip wheel setuptools psutil pyudev
RUN pip3 install --ignore-installed --prefer-binary -r ./requirements_ui.txt

# clean up apt
Expand Down Expand Up @@ -105,11 +111,10 @@ FROM ui-deps as build
LABEL org.opencontainers.image.source=https://github.com/automatic-ripping-machine/automatic-ripping-machine
LABEL org.opencontainers.image.license=MIT
LABEL org.opencontainers.image.description='Automatic Ripping Machine User Interface Container'
LABEL org.opencontainers.image.version="3.0_dev"
LABEL org.opencontainers.image.version="3.0_dev_1"

## Setup folders and fstab
RUN \
mkdir -m 0777 -p /home/arm /home/arm/config
RUN mkdir -m 0777 -p /home/arm /home/arm/config

# Add ARM UI service
RUN mkdir /etc/service/armui
Expand Down
10 changes: 5 additions & 5 deletions requirements_ui.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ argparse==1.4.0
alembic==1.13.1
bcrypt==4.1.3
colorama==0.4.4
mysql-connector-python==9.1.0 # Required for Flask to use the mysql connector
flake8==6.0.0
Flask-Alembic==3.0.1
Flask-CORS==3.0.10
Expand All @@ -28,17 +29,16 @@ sqlalchemy==2.0.25
waitress==3.0.1

# Additional Python packages
mysql-connector-python # Required for Flask to use the mysql connector
psutil==6.1.0
pyudev==0.21.0

# Required for developers conducting testing
pytest==8.1.1
WTForms~=3.0.1
pyudev~=0.24.1
psutil~=5.9.5
requests~=2.32.0
PyYAML~=6.0.1
apprise~=1.4.5
pydvdid~=1.1
xmltodict~=0.13.0
# musicbrainzngs~=0.7.1
# discid~=1.2.0
musicbrainzngs~=0.7.1
discid~=1.2.0

0 comments on commit 9ffcb43

Please sign in to comment.