-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathDockerfile
More file actions
128 lines (110 loc) · 4.03 KB
/
Dockerfile
File metadata and controls
128 lines (110 loc) · 4.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
###########################################################
# base image, used for build stages and final images
FROM phusion/baseimage:jammy-1.0.4 AS base
RUN mkdir /opt/arm
WORKDIR /opt/arm
# start by updating and upgrading the OS
RUN \
apt clean && \
apt update && \
apt upgrade -y -o Dpkg::Options::="--force-confold"
# 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
# enable support for Arch Linux and derivatives, who use a different user group for optical drive permissions
RUN groupadd -g 990 optical \
&& usermod -aG optical arm
# Enable support for Fedora derivatives, which uses GID 11 for the cdrom group for optical drive permissions, whereas Ubuntu uses GID 24 for the same group name.
RUN groupadd -g 11 cdrom_Fedora \
&& usermod -aG cdrom_Fedora arm
# set the default environment variables
# UID and GID are not settable as of https://github.com/phusion/baseimage-docker/pull/86, as doing so would
# break multi-account containers
ENV ARM_UID=1000
ENV ARM_GID=1000
# setup gnupg/wget for add-ppa.sh
RUN install_clean \
git \
wget \
build-essential \
libcurl4-openssl-dev \
libssl-dev \
gnupg \
libudev-dev \
udev \
python3 \
python3-dev \
python3-pip \
nano \
vim \
# arm extra requirements
scons swig libzbar-dev libzbar0
###########################################################
# install deps specific to the docker deployment
FROM base AS deps-docker
RUN install_clean gosu
###########################################################
# install deps for ripper
FROM deps-docker AS deps-ripper
RUN install_clean \
abcde \
eyed3 \
atomicparsley \
cdparanoia \
eject \
ffmpeg \
flac \
glyrc \
default-jre-headless \
id3 \
id3v2 \
lame \
libavcodec-extra \
lsdvd \
mkcue \
vorbis-tools \
opus-tools \
fdkaac
# install libdvd-pkg
RUN \
install_clean libdvd-pkg && \
dpkg-reconfigure libdvd-pkg
# install python reqs
COPY requirements.txt ./requirements.txt
RUN pip3 install --upgrade pip wheel setuptools psutil pyudev
RUN pip3 install --ignore-installed --prefer-binary -r ./requirements.txt
###########################################################
# install makemkv and handbrake
FROM deps-ripper AS install-makemkv-handbrake
COPY ./scripts/install_mkv_hb_deps.sh /install_mkv_hb_deps.sh
RUN chmod +x /install_mkv_hb_deps.sh && sleep 1 && \
/install_mkv_hb_deps.sh
COPY ./scripts/install_handbrake.sh /install_handbrake.sh
RUN chmod +x /install_handbrake.sh && sleep 1 && \
/install_handbrake.sh
# MakeMKV setup by https://github.com/tianon
COPY ./scripts/install_makemkv.sh /install_makemkv.sh
RUN chmod +x /install_makemkv.sh && sleep 1 && \
/install_makemkv.sh
# clean up apt
RUN apt clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Container healthcheck
COPY scripts/healthcheck.sh /healthcheck.sh
RUN chmod +x /healthcheck.sh
HEALTHCHECK --interval=5m --timeout=15s --start-period=30s CMD /healthcheck.sh
# Set Timezone data
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/UTC
RUN install_clean tzdata && \
ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
ARG VERSION
ARG BUILD_DATE
# set metadata
LABEL org.opencontainers.image.source=https://github.com/automatic-ripping-machine/arm-dependencies.git
LABEL org.opencontainers.image.url=https://github.com/automatic-ripping-machine/arm-dependencies
LABEL org.opencontainers.image.description="Dependencies for Automatic Ripping Machine"
LABEL org.opencontainers.image.documentation=https://raw.githubusercontent.com/automatic-ripping-machine/arm-dependencies/main/README.md
LABEL org.opencontainers.image.license=MIT
LABEL org.opencontainers.image.version=$VERSION
LABEL org.opencontainers.image.created=$BUILD_DATE