Skip to content

Commit e5e4833

Browse files
authored
Merge pull request #108 from jeeshofone/main
2 parents 80b1c6e + 698496e commit e5e4833

File tree

7 files changed

+550
-328
lines changed

7 files changed

+550
-328
lines changed

README.md

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ This container will detect optical disks by their type and rip them automaticall
88

99
Disc Type | Output | Tools used
1010
---|---|---
11-
CD | MP3 and FLAC | abcde (lame and flac)
12-
Data-Disk | Uncompressed .ISO | ddrescue
13-
DVD | MKV | MakeMKV
14-
BluRay | MKV | MakeMKV
11+
CD | MP3 FLAC ISO | abcde (lame and flac), ddrescue
12+
Data-Disk | ISO | ddrescue
13+
DVD | MKV and ISO | MakeMKV, ddrescue
14+
BluRay | MKV and ISO | MakeMKV, ddrescue
1515

1616
### Prerequistites
1717

@@ -60,6 +60,7 @@ Add these optional parameters when running the container
6060
-e /ripper-ui=OPTIONAL_WEB_UI_PATH_PREFIX \
6161
-e myusername=OPTIONAL_WEB_UI_USERNAME \
6262
-e strongpassword=OPTIONAL_WEB_UI_PASSWORD \
63+
-e DEBUGTOWEB=true \
6364
````
6465

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

89-
# Docker compose
90+
## Docker compose
9091

91-
Check the device mount points and optional settings before you run the container!
92+
Check the device mount points and optional settings before you run the container.
9293

9394
`docker-compose up -d`
9495

96+
### Environment Variables
97+
98+
- `EJECTENABLED`: Optional - If set to `true`, the disc is ejected after ripping is completed. Default is `true`.
99+
- `JUSTMAKEISO`: Optional - If `true`, only an ISO of the disc is created. Default is `false`.
100+
- `STORAGE_CD`: Optional - The path for storing ripped CD content. Default is `/out/Ripper/CD`.
101+
- `STORAGE_DATA`: Optional - The path for storing data disc ISOs. Default is `/out/Ripper/DATA`.
102+
- `STORAGE_DVD`: Optional - The path for storing ripped DVD content. Default is `/out/Ripper/DVD`.
103+
- `STORAGE_BD`: Optional - The path for storing ripped BluRay content. Default is `/out/Ripper/BluRay`.
104+
- `DRIVE`: Optional - The device file for the optical drive (e.g., `/dev/sr0`). Default is `/dev/sr0`.
105+
- `BAD_THRESHOLD`: Optional - The number of allowed consecutive bad read attempts before failing. Default is `5`.
106+
- `DEBUG`: Optional - Enables verbose logging when set to `true`. Default is `false`.
107+
- `DEBUGTOWEB`: Optional - If `true`, debug logs are published to the web UI. Default is `false`.
108+
- `SEPARATERAWFINISH`: Optional - When `true`, separates raw and final rips into different directories. Default is `false`.
109+
- `ALSOMAKEISO`: Optional - If `true`, creates an additional ISO image alongside the normal rip operation. Default is `false`.
110+
- `TIMESTAMPPREFIX`: Optional - If `true`, prefixes output folders with a timestamp for organization. Default is `false`.
111+
- `MINIMUMLENGTH`: Optional - The minimum length of a title in seconds to be considered valid.(Applies to DVD and BluRAY) Default is `600`.
112+
- `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
113+
- `USER`: Optional - user name for the integrated web ui (requires PASS to be set) - if not set, the web ui will not require authentication
114+
- `PASS`: Optional - password for the integrated web ui (requires USER to be set) - if not set, the web ui will not require authentication
115+
116+
### Building and Running with Docker Compose
117+
118+
First clone the repository:
119+
120+
```git clone https://github.com/rix1337/docker-ripper.git```
121+
122+
You can build and run docker-ripper using Docker Compose, which simplifies the process of deploying and managing containers
123+
124+
You can build two different versions of the image "latest" and "manual-build"
125+
126+
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.
127+
"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.
128+
129+
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`
130+
131+
- To build the image:
132+
133+
```docker-compose build``` or ```docker-compose build --no-cache```
134+
135+
- To start the container:
136+
137+
```docker-compose up -d``` or ```docker-compose up```
138+
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.
139+
140+
- Logs
141+
142+
Logs can be viewed with `docker-compose logs` or `docker-compose logs -f` to follow the logs in real time.
143+
144+
If you prefer to build the Docker image manually without Docker Compose, you can use the docker build command:
145+
146+
To build the "latest" image using docker build:
147+
148+
```docker build -f latest/Dockerfile -t rix1337/docker-ripper:latest .```
149+
150+
This command performs the same operation as the docker-compose build but requires manual input of build context and parameters.
151+
152+
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.
153+
154+
155+
95156
# FAQ
96157

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

202263
- [MakeMKV key/version fetcher by metalight](http://blog.metalight.dk/2016/03/makemkv-wrapper-with-auto-updater.html)
264+
265+
- [General cleanup and exposing customization options to the user by jeeshofone](https://123cloud.st)

docker-compose.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,33 @@ version: '3.3'
22
services:
33
docker-ripper:
44
container_name: Ripper
5+
#build: # optional - use this if you want to build the image yourself
6+
# dockerfile: latest/Dockerfile # this uses the repo version of makemkvcon
7+
# dockerfile: manual-build/Dockerfile # this will build makeMKV from source - this takes a long time but will always be the latest version
8+
image: rix1337/docker-ripper:latest
59
volumes:
6-
- '/path/to/config/:/config:rw'
7-
- '/path/to/rips/:/out:rw'
10+
#- ./ripper-config:/config:rw # optional - path to the config folder - if not provided, a default config will be used
11+
- ./ripper-output:/out:rw
812
devices:
9-
- '/dev/sr0:/dev/sr0'
10-
- '/dev/sg0:/dev/sg0'
13+
- /dev/sr0:/dev/sr0
14+
- /dev/sg0:/dev/sg0
1115
ports:
12-
- 'port:9090' # optional - port for the integrated web ui
16+
- 9090:9090
1317
environment:
14-
- PREFIX=OPTIONAL_WEB_UI_PATH_PREFIX # optional - path prefix for the integrated web ui
15-
- USER=OPTIONAL_WEB_UI_USERNAME # optional - user name for the integrated web ui (requires PASS to be set)
16-
- PASS=OPTIONAL_WEB_UI_PASSWORD # optional - password for the integrated web ui (requires USER to be set)
17-
privileged: true # optional - only use when your drive is not detected inside the container
18-
image: rix1337/docker-ripper:manual-latest
18+
- SEPARATERAWFINISH=true # optional - true/false - separate the raw files from the finished files
19+
- EJECTENABLED=true # optional - true/false - eject the disc when finished
20+
- STORAGE_CD=/out/Ripper/CD # optional - path to the storage folder for CD rips - should be to a folder in the mounted /out volume
21+
- STORAGE_DVD=/out/Ripper/DVD # optional - path to the storage folder for DVD rips - should be to a folder in the mounted /out volume
22+
- STORAGE_BD=/out/Ripper/BluRay # optional - path to the storage folder for BD rips - should be to a folder in the mounted /out volume
23+
- STORAGE_DATA=/out/Ripper/Data # optional - path to the storage folder for Data rips - should be to a folder in the mounted /out volume
24+
- DRIVE=/dev/sr0 # optional - path to the optical drive - should be to the mounted /dev/sr0 device
25+
- JUSTMAKEISO=false # optional - true/false just making an ISO of any disc
26+
- ALSOMAKEISO=false # optional - true/false - will do the normal rip and also make an ISO of every disc
27+
- TIMESTAMPPREFIX=false # optional - true/false - prefix the output folder with a timestamp
28+
- DEBUG=false # optional - true/false - enable debug logging
29+
- DEBUGTOWEB=false # optional - true/false - enable debug logging to the web ui
30+
- MINIMUMLENGTH=600 # optional - minimum length of the disc in seconds - if the disc or chapter is shorter than this, it will not be ripped
31+
# - 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
32+
# - 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
33+
# - 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
34+
privileged: true

latest/Dockerfile

Lines changed: 46 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,55 @@
11
FROM phusion/baseimage:focal-1.0.0
2-
MAINTAINER rix1337
2+
LABEL maintainer="rix1337"
33

4-
# Set correct environment variables
5-
ENV HOME /root
6-
ENV DEBIAN_FRONTEND noninteractive
7-
ENV LC_ALL C.UTF-8
8-
ENV LANG en_US.UTF-8
9-
ENV LANGUAGE en_US.UTF-8
4+
ENV DEBIAN_FRONTEND=noninteractive \
5+
LC_ALL=C.UTF-8 \
6+
LANG=en_US.UTF-8 \
7+
LANGUAGE=en_US.UTF-8 \
8+
HOME=/root
9+
10+
# Disable SSH
11+
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
1012

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

14-
# Configure user nobody to match unRAID's settings
15-
RUN \
16-
usermod -u 99 nobody && \
17-
usermod -g 100 nobody && \
18-
usermod -d /home nobody && \
19-
chown -R nobody:users /home
20-
21-
# Move Files
22-
COPY root/ /
23-
RUN chmod +x /etc/my_init.d/*.sh
16+
# Invalidate build cache on new releases of MakeMKV
17+
ADD "https://launchpad.net/~heyarje/+archive/ubuntu/makemkv-beta/+builds?build_text=makemkv-bin&build_state=built" /dev/null
2418

2519
# Install software
26-
RUN apt-get update && \
27-
apt-get -y --allow-unauthenticated install --no-install-recommends gddrescue wget eject sdparm git && \
28-
apt-get -y install abcde eyed3 && \
29-
apt-get -y install flac lame mkcue speex vorbis-tools vorbisgain id3 id3v2 && \
30-
apt-get -y autoremove
31-
32-
# Install python for web ui
33-
RUN apt-get update && \
34-
apt-get -y --allow-unauthenticated install --no-install-recommends python3 python3-pip && \
35-
pip3 install docopt flask waitress
36-
37-
# Disable SSH
38-
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
39-
40-
# invalidate build cache on repo build
41-
ADD "https://launchpad.net/~heyarje/+archive/ubuntu/makemkv-beta/+builds?build_text=makemkv-bin&build_state=built" latest_build
42-
43-
# Install MakeMKV
44-
RUN add-apt-repository ppa:heyarje/makemkv-beta && \
20+
RUN add-apt-repository -y ppa:heyarje/makemkv-beta && \
4521
apt-get update && \
46-
apt-get -y install makemkv-bin makemkv-oss ccextractor && \
47-
apt-get -y autoremove
48-
49-
# Clean up temp files
50-
RUN rm -rf \
51-
/tmp/* \
52-
/var/lib/apt/lists/* \
53-
/var/tmp/*
22+
apt-get install -y --no-install-recommends \
23+
abcde \
24+
ccextractor \
25+
eject \
26+
eyed3 \
27+
flac \
28+
gddrescue \
29+
git \
30+
id3 \
31+
id3v2 \
32+
lame \
33+
makemkv-bin \
34+
makemkv-oss \
35+
mkcue \
36+
python3 \
37+
python3-pip \
38+
sdparm \
39+
speex \
40+
vorbis-tools \
41+
vorbisgain \
42+
wget && \
43+
apt-get autoremove -y && \
44+
apt-get clean && \
45+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
46+
47+
# Install python packages for web ui
48+
RUN pip3 install --no-cache-dir \
49+
docopt \
50+
flask \
51+
waitress
52+
53+
# Move Files and set permissions
54+
COPY root/ /
55+
RUN chmod +x /etc/my_init.d/*.sh

manual-build/Dockerfile

Lines changed: 44 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,57 @@
11
FROM phusion/baseimage:focal-1.0.0
2-
MAINTAINER rix1337
2+
LABEL maintainer="rix1337"
33

4-
# Set correct environment variables
5-
ENV HOME /root
6-
ENV DEBIAN_FRONTEND noninteractive
7-
ENV LC_ALL C.UTF-8
8-
ENV LANG en_US.UTF-8
9-
ENV LANGUAGE en_US.UTF-8
4+
ENV DEBIAN_FRONTEND=noninteractive \
5+
HOME=/root \
6+
LC_ALL=C.UTF-8 \
7+
LANG=en_US.UTF-8 \
8+
LANGUAGE=en_US.UTF-8
109

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

1413
# Configure user nobody to match unRAID's settings
15-
RUN \
16-
usermod -u 99 nobody && \
17-
usermod -g 100 nobody && \
18-
usermod -d /home nobody && \
19-
chown -R nobody:users /home
14+
RUN usermod -u 99 nobody && \
15+
usermod -g 100 nobody && \
16+
usermod -d /home nobody && \
17+
chown nobody:users /home -R
2018

21-
# Move Files
19+
# Install Required packages
20+
RUN apt-get update && \
21+
apt-get install -y --no-install-recommends \
22+
python3 \
23+
python3-pip \
24+
eject \
25+
sdparm \
26+
gddrescue \
27+
abcde \
28+
eyed3 \
29+
ffmpeg \
30+
flac \
31+
lame \
32+
mkcue \
33+
speex \
34+
vorbis-tools \
35+
vorbisgain \
36+
id3 \
37+
id3v2 && \
38+
pip3 install --no-cache-dir docopt flask waitress && \
39+
apt-get autoremove -y && \
40+
apt-get clean && \
41+
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
42+
43+
# Invalidate build cache on forum post change
44+
ADD "https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224" /dev/null
45+
46+
# Move Files, set permissions and install makemkv
2247
COPY root/ /
2348
COPY manual-build/install/ /install
2449
RUN chmod +x /etc/my_init.d/*.sh && \
25-
chmod -R 777 /tmp && \
26-
chmod -R 777 /install
27-
28-
# Install Required packages
29-
RUN apt-get update && \
30-
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 && \
31-
pip3 install docopt flask waitress && \
32-
apt-get -y autoremove
50+
chmod -R 777 /tmp && \
51+
chmod 775 /install && \
52+
chmod +x /install/install.sh && \
53+
/install/install.sh && \
54+
rm -rf /install
3355

34-
# Disable SSH
56+
# Disable SSH
3557
RUN rm -rf /etc/service/sshd /etc/my_init.d/00_regen_ssh_host_keys.sh
36-
37-
# invalidate build cache on forum post change
38-
ADD "https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224" latest_post
39-
40-
# MakeMKV setup by https://github.com/tianon
41-
RUN chmod +x /install/install.sh && sleep 1 && \
42-
/install/install.sh
43-
44-
# Clean up temp files
45-
RUN rm -rf \
46-
/tmp/* \
47-
/var/lib/apt/lists/* \
48-
/var/tmp/* \
49-
/install/* \

0 commit comments

Comments
 (0)