Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
1d2010b
fix bash formatting to make it easier to read
jeeshofone Jan 26, 2024
496ba66
MAINTAINER has been deprecated
jeeshofone Jan 26, 2024
bb710fc
reduce apt to single install line
jeeshofone Jan 26, 2024
f0b9e5d
add feature to disable eject
jeeshofone Jan 26, 2024
44e6467
ejectDisk function to simplify code
jeeshofone Jan 26, 2024
4ddb955
populate paths with sane defaults
jeeshofone Jan 26, 2024
943cb49
remove unRAID specifics
jeeshofone Jan 26, 2024
110748d
re-arrange based on probability to change
jeeshofone Jan 26, 2024
5bb760d
fix formatting here
jeeshofone Jan 26, 2024
92fe568
env pass thru testing
jeeshofone Jan 26, 2024
4110c57
fix &&
jeeshofone Jan 26, 2024
65c9b96
i think this is going to be required
jeeshofone Jan 26, 2024
6e5d500
lets take custom parameters from the environment
jeeshofone Jan 26, 2024
77539d6
remove the optional config mount
jeeshofone Jan 26, 2024
c86157f
Optimize Dockerfile for smaller image size and better readability
jeeshofone Jan 26, 2024
54d7c35
move build cache invalidator to proper location
jeeshofone Jan 26, 2024
6d06016
update readability
jeeshofone Jan 26, 2024
337fbe9
updating ripper.sh for best practices
jeeshofone Jan 26, 2024
2b63e83
will update them to lowercase later when done testing
jeeshofone Jan 26, 2024
5115e90
for my current testing this is disabled, will roll this back later
jeeshofone Jan 26, 2024
6923778
caps again
jeeshofone Jan 26, 2024
578db47
copy paste error fix
jeeshofone Jan 26, 2024
b396d4f
ensure /config exists since we don't have to map it in which created …
jeeshofone Jan 26, 2024
d09a90f
add function for checking the disc type
jeeshofone Jan 26, 2024
278ea39
Correct spelling of Disk to Disc
jeeshofone Jan 26, 2024
ffdae00
Refactor disc ripper script to improve maintainability and error hand…
jeeshofone Jan 26, 2024
be7d501
debug
jeeshofone Jan 26, 2024
67ef01e
lets go full debug mode
jeeshofone Jan 26, 2024
8ebc618
debug is an environment var
jeeshofone Jan 26, 2024
c3c325f
debug modes
jeeshofone Jan 26, 2024
99ff8a2
flip to an array and cases
jeeshofone Jan 26, 2024
dfa14a4
cleanup formatting and add functionality for "JustMakeISO"
jeeshofone Jan 26, 2024
8c6f7ab
adds functionality for "also make iso"
jeeshofone Jan 26, 2024
ecf6ac5
lets add support for SEPARATERAWFINISH
jeeshofone Jan 26, 2024
125ff34
finish adding support for move_to_finished
jeeshofone Jan 26, 2024
bae782d
update ripper.sh with formatting changes
jeeshofone Jan 26, 2024
181907f
simplify move_to_finished command
jeeshofone Jan 26, 2024
0010563
added support for TIMESTAMPPREFIX
jeeshofone Jan 26, 2024
6f7c51f
context for docker file provides better syntax?
jeeshofone Jan 26, 2024
72094b3
Revert "context for docker file provides better syntax?"
jeeshofone Jan 26, 2024
959f2f2
accurately mark environment options as optional
jeeshofone Jan 26, 2024
0ac2607
Update .gitignore
jeeshofone Jan 26, 2024
fd0db08
Update ripper.sh with formatting
jeeshofone Jan 26, 2024
6a09dce
add feature for minimum length adjustment
jeeshofone Jan 26, 2024
bed437c
Revert "for my current testing this is disabled, will roll this back …
jeeshofone Jan 26, 2024
4c4ed45
Update docker-compose with build definition and image location
jeeshofone Jan 26, 2024
f5f0779
Update Readme.md
jeeshofone Jan 26, 2024
eedd994
Update Readme.md
jeeshofone Jan 26, 2024
c48b0ee
Update README.md
jeeshofone Jan 26, 2024
1db8c7b
Update Readme.md
jeeshofone Jan 26, 2024
a15a92c
Update manual-build dockerfile
jeeshofone Jan 26, 2024
87280f6
update dockerfile to provide install permissions
jeeshofone Jan 26, 2024
f4b38dd
fix buildcache break location
jeeshofone Jan 26, 2024
65d03b6
readme.md update for building
jeeshofone Jan 26, 2024
ca37e27
Update Readme.md
jeeshofone Jan 26, 2024
fe0347b
fix logic for when to eject
jeeshofone Jan 26, 2024
ab0a299
Fix edge case of double iso file
jeeshofone Jan 26, 2024
698496e
update ripper.sh to handle timestamp if required.
jeeshofone Jan 26, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 69 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ This container will detect optical disks by their type and rip them automaticall

Disc Type | Output | Tools used
---|---|---
CD | MP3 and FLAC | abcde (lame and flac)
Data-Disk | Uncompressed .ISO | ddrescue
DVD | MKV | MakeMKV
BluRay | MKV | MakeMKV
CD | MP3 FLAC ISO | abcde (lame and flac), ddrescue
Data-Disk | ISO | ddrescue
DVD | MKV and ISO | MakeMKV, ddrescue
BluRay | MKV and ISO | MakeMKV, ddrescue

### Prerequistites

Expand Down Expand Up @@ -60,6 +60,7 @@ Add these optional parameters when running the container
-e /ripper-ui=OPTIONAL_WEB_UI_PATH_PREFIX \
-e myusername=OPTIONAL_WEB_UI_USERNAME \
-e strongpassword=OPTIONAL_WEB_UI_PASSWORD \
-e DEBUGTOWEB=true \
````

`OPTIONAL_WEB_UI_USERNAME ` and `OPTIONAL_WEB_UI_PASSWORD ` both need to be set to enable http basic auth for the web UI.
Expand All @@ -86,12 +87,72 @@ launch. Without a purchased license key Ripper may stop running at any time.
3) At this point your config directory should look like this:
![config directory](https://raw.githubusercontent.com/rix1337/docker-ripper/main/.github/screenshots/configdirectory.png)

# Docker compose
## Docker compose

Check the device mount points and optional settings before you run the container!
Check the device mount points and optional settings before you run the container.

`docker-compose up -d`

### Environment Variables

- `EJECTENABLED`: Optional - If set to `true`, the disc is ejected after ripping is completed. Default is `true`.
- `JUSTMAKEISO`: Optional - If `true`, only an ISO of the disc is created. Default is `false`.
- `STORAGE_CD`: Optional - The path for storing ripped CD content. Default is `/out/Ripper/CD`.
- `STORAGE_DATA`: Optional - The path for storing data disc ISOs. Default is `/out/Ripper/DATA`.
- `STORAGE_DVD`: Optional - The path for storing ripped DVD content. Default is `/out/Ripper/DVD`.
- `STORAGE_BD`: Optional - The path for storing ripped BluRay content. Default is `/out/Ripper/BluRay`.
- `DRIVE`: Optional - The device file for the optical drive (e.g., `/dev/sr0`). Default is `/dev/sr0`.
- `BAD_THRESHOLD`: Optional - The number of allowed consecutive bad read attempts before failing. Default is `5`.
- `DEBUG`: Optional - Enables verbose logging when set to `true`. Default is `false`.
- `DEBUGTOWEB`: Optional - If `true`, debug logs are published to the web UI. Default is `false`.
- `SEPARATERAWFINISH`: Optional - When `true`, separates raw and final rips into different directories. Default is `false`.
- `ALSOMAKEISO`: Optional - If `true`, creates an additional ISO image alongside the normal rip operation. Default is `false`.
- `TIMESTAMPPREFIX`: Optional - If `true`, prefixes output folders with a timestamp for organization. Default is `false`.
- `MINIMUMLENGTH`: Optional - The minimum length of a title in seconds to be considered valid.(Applies to DVD and BluRAY) Default is `600`.
- `PREFIX`: Optional - path prefix for the integrated web ui when commented out or set to /, the web ui will be at the root of the server
- `USER`: Optional - user name for the integrated web ui (requires PASS to be set) - if not set, the web ui will not require authentication
- `PASS`: Optional - password for the integrated web ui (requires USER to be set) - if not set, the web ui will not require authentication

### Building and Running with Docker Compose

First clone the repository:

```git clone https://github.com/rix1337/docker-ripper.git```

You can build and run docker-ripper using Docker Compose, which simplifies the process of deploying and managing containers

You can build two different versions of the image "latest" and "manual-build"

Manual-build is the recommended version, as it is updated much faster to newly released makemkv versions - that are required when running with the free beta key.
"latest" is based on the latest makemkv version available in the Ubuntu PPA. This version is more stable, but might not work with the free beta key for a while after a new makemkv version is released. It will build faster, as it does not need to compile makemkv from source.

Make sure to uncomment the version you want to build in the docker-compose.yml file build section and comment out the pre-built image tag `#image: rix1337/docker-ripper:latest`

- To build the image:

```docker-compose build``` or ```docker-compose build --no-cache```

- To start the container:

```docker-compose up -d``` or ```docker-compose up```
This command with the `-d` flag will start the container in detached mode, meaning it will run in the background. Without the `-d` flag, the container will run in the foreground and log to the console. You can stop the container with `docker-compose stop` or `docker-compose down`. The latter will also remove the container.

- Logs

Logs can be viewed with `docker-compose logs` or `docker-compose logs -f` to follow the logs in real time.

If you prefer to build the Docker image manually without Docker Compose, you can use the docker build command:

To build the "latest" image using docker build:

```docker build -f latest/Dockerfile -t rix1337/docker-ripper:latest .```

This command performs the same operation as the docker-compose build but requires manual input of build context and parameters.

Remember to periodically pull the latest changes from the git repository to keep your Dockerfile up to date and rebuild the image if any updates have been made.



# FAQ

### MakeMKV needs an update!
Expand Down Expand Up @@ -200,3 +261,5 @@ root@linuxbox# udevadm control --reload-rules && udevadm trigger
- [MakeMKV Setup for manual-build by tianon](https://github.com/tianon/dockerfiles/blob/master/makemkv/Dockerfile)

- [MakeMKV key/version fetcher by metalight](http://blog.metalight.dk/2016/03/makemkv-wrapper-with-auto-updater.html)

- [General cleanup and exposing customization options to the user by jeeshofone](https://123cloud.st)
36 changes: 26 additions & 10 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,33 @@ version: '3.3'
services:
docker-ripper:
container_name: Ripper
#build: # optional - use this if you want to build the image yourself
# dockerfile: latest/Dockerfile # this uses the repo version of makemkvcon
# dockerfile: manual-build/Dockerfile # this will build makeMKV from source - this takes a long time but will always be the latest version
image: rix1337/docker-ripper:latest
volumes:
- '/path/to/config/:/config:rw'
- '/path/to/rips/:/out:rw'
#- ./ripper-config:/config:rw # optional - path to the config folder - if not provided, a default config will be used
- ./ripper-output:/out:rw
devices:
- '/dev/sr0:/dev/sr0'
- '/dev/sg0:/dev/sg0'
- /dev/sr0:/dev/sr0
- /dev/sg0:/dev/sg0
ports:
- 'port:9090' # optional - port for the integrated web ui
- 9090:9090
environment:
- PREFIX=OPTIONAL_WEB_UI_PATH_PREFIX # optional - path prefix for the integrated web ui
- USER=OPTIONAL_WEB_UI_USERNAME # optional - user name for the integrated web ui (requires PASS to be set)
- PASS=OPTIONAL_WEB_UI_PASSWORD # optional - password for the integrated web ui (requires USER to be set)
privileged: true # optional - only use when your drive is not detected inside the container
image: rix1337/docker-ripper:manual-latest
- SEPARATERAWFINISH=true # optional - true/false - separate the raw files from the finished files
- EJECTENABLED=true # optional - true/false - eject the disc when finished
- STORAGE_CD=/out/Ripper/CD # optional - path to the storage folder for CD rips - should be to a folder in the mounted /out volume
- STORAGE_DVD=/out/Ripper/DVD # optional - path to the storage folder for DVD rips - should be to a folder in the mounted /out volume
- STORAGE_BD=/out/Ripper/BluRay # optional - path to the storage folder for BD rips - should be to a folder in the mounted /out volume
- STORAGE_DATA=/out/Ripper/Data # optional - path to the storage folder for Data rips - should be to a folder in the mounted /out volume
- DRIVE=/dev/sr0 # optional - path to the optical drive - should be to the mounted /dev/sr0 device
- JUSTMAKEISO=false # optional - true/false just making an ISO of any disc
- ALSOMAKEISO=false # optional - true/false - will do the normal rip and also make an ISO of every disc
- TIMESTAMPPREFIX=false # optional - true/false - prefix the output folder with a timestamp
- DEBUG=false # optional - true/false - enable debug logging
- DEBUGTOWEB=false # optional - true/false - enable debug logging to the web ui
- MINIMUMLENGTH=600 # optional - minimum length of the disc in seconds - if the disc or chapter is shorter than this, it will not be ripped
# - PREFIX=OPTIONAL_WEB_UI_PATH_PREFIX # optional - path prefix for the integrated web ui when commented out or set to /, the web ui will be at the root of the server
# - USER=OPTIONAL_WEB_UI_USERNAME # optional - user name for the integrated web ui (requires PASS to be set) - if not set, the web ui will not require authentication
# - PASS=OPTIONAL_WEB_UI_PASSWORD # optional - password for the integrated web ui (requires USER to be set) - if not set, the web ui will not require authentication
privileged: true
90 changes: 46 additions & 44 deletions latest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,53 +1,55 @@
FROM phusion/baseimage:focal-1.0.0
MAINTAINER rix1337
LABEL maintainer="rix1337"

# Set correct environment variables
ENV HOME /root
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive \
LC_ALL=C.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8 \
HOME=/root

# Disable SSH
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh

# Use baseimage-docker's init system
CMD ["/sbin/my_init"]

# Configure user nobody to match unRAID's settings
RUN \
usermod -u 99 nobody && \
usermod -g 100 nobody && \
usermod -d /home nobody && \
chown -R nobody:users /home

# Move Files
COPY root/ /
RUN chmod +x /etc/my_init.d/*.sh
# Invalidate build cache on new releases of MakeMKV
ADD "https://launchpad.net/~heyarje/+archive/ubuntu/makemkv-beta/+builds?build_text=makemkv-bin&build_state=built" /dev/null

# Install software
RUN apt-get update && \
apt-get -y --allow-unauthenticated install --no-install-recommends gddrescue wget eject sdparm git && \
apt-get -y install abcde eyed3 && \
apt-get -y install flac lame mkcue speex vorbis-tools vorbisgain id3 id3v2 && \
apt-get -y autoremove

# Install python for web ui
RUN apt-get update && \
apt-get -y --allow-unauthenticated install --no-install-recommends python3 python3-pip && \
pip3 install docopt flask waitress

# Disable SSH
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh

# invalidate build cache on repo build
ADD "https://launchpad.net/~heyarje/+archive/ubuntu/makemkv-beta/+builds?build_text=makemkv-bin&build_state=built" latest_build

# Install MakeMKV
RUN add-apt-repository ppa:heyarje/makemkv-beta && \
RUN add-apt-repository -y ppa:heyarje/makemkv-beta && \
apt-get update && \
apt-get -y install makemkv-bin makemkv-oss ccextractor && \
apt-get -y autoremove

# Clean up temp files
RUN rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
apt-get install -y --no-install-recommends \
abcde \
ccextractor \
eject \
eyed3 \
flac \
gddrescue \
git \
id3 \
id3v2 \
lame \
makemkv-bin \
makemkv-oss \
mkcue \
python3 \
python3-pip \
sdparm \
speex \
vorbis-tools \
vorbisgain \
wget && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Install python packages for web ui
RUN pip3 install --no-cache-dir \
docopt \
flask \
waitress

# Move Files and set permissions
COPY root/ /
RUN chmod +x /etc/my_init.d/*.sh
80 changes: 44 additions & 36 deletions manual-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,49 +1,57 @@
FROM phusion/baseimage:focal-1.0.0
MAINTAINER rix1337
LABEL maintainer="rix1337"

# Set correct environment variables
ENV HOME /root
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive \
HOME=/root \
LC_ALL=C.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8

# Use baseimage-docker's init system
CMD ["/sbin/my_init"]

# Configure user nobody to match unRAID's settings
RUN \
usermod -u 99 nobody && \
usermod -g 100 nobody && \
usermod -d /home nobody && \
chown -R nobody:users /home
RUN usermod -u 99 nobody && \
usermod -g 100 nobody && \
usermod -d /home nobody && \
chown nobody:users /home -R

# Move Files
# Install Required packages
RUN apt-get update && \
apt-get install -y --no-install-recommends \
python3 \
python3-pip \
eject \
sdparm \
gddrescue \
abcde \
eyed3 \
ffmpeg \
flac \
lame \
mkcue \
speex \
vorbis-tools \
vorbisgain \
id3 \
id3v2 && \
pip3 install --no-cache-dir docopt flask waitress && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# Invalidate build cache on forum post change
ADD "https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224" /dev/null

# Move Files, set permissions and install makemkv
COPY root/ /
COPY manual-build/install/ /install
RUN chmod +x /etc/my_init.d/*.sh && \
chmod -R 777 /tmp && \
chmod -R 777 /install

# Install Required packages
RUN apt-get update && \
apt-get -y --allow-unauthenticated install --no-install-recommends python3 python3-pip eject sdparm gddrescue abcde eyed3 ffmpeg flac lame mkcue speex vorbis-tools vorbisgain id3 id3v2 && \
pip3 install docopt flask waitress && \
apt-get -y autoremove
chmod -R 777 /tmp && \
chmod 775 /install && \
chmod +x /install/install.sh && \
/install/install.sh && \
rm -rf /install

# Disable SSH
# Disable SSH
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh

# invalidate build cache on forum post change
ADD "https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224" latest_post

# MakeMKV setup by https://github.com/tianon
RUN chmod +x /install/install.sh && sleep 1 && \
/install/install.sh

# Clean up temp files
RUN rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
/install/* \
Loading