-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
49 lines (44 loc) · 1.78 KB
/
Dockerfile
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
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:python
RUN set -x && \
# define packages needed for installation and general management of the container:
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
KEPT_PIP3_PACKAGES=() && \
KEPT_PACKAGES+=(procps nano aptitude netcat) && \
KEPT_PACKAGES+=(nginx) && \
KEPT_PACKAGES+=(php-fpm) && \
KEPT_PACKAGES+=(psmisc) && \
# KEPT_PIP3_PACKAGES+=(apprise) && \ for now, apprise must be installed from its github main branch until the twitter image features have been released
KEPT_PIP3_PACKAGES+=(setuptools) && \
KEPT_PIP3_PACKAGES+=(requests) && \
TEMP_PACKAGES+=(git) && \
#
# Install all these packages:
apt-get update && \
apt-get install -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -o Dpkg::Options::="--force-confold" --force-yes -y --no-install-recommends --no-install-suggests\
${KEPT_PACKAGES[@]} \
${TEMP_PACKAGES[@]} && \
#
# PIP3 installations:
pip3 install ${KEPT_PIP3_PACKAGES[@]} && \
#
# Install Apprise:
git clone --depth 1 https://github.com/caronc/apprise /tmp/apprise && \
pushd /tmp/apprise/ && \
python3 ./setup.py install && \
popd && \
# Clean up apt installations:
apt-get remove -y ${TEMP_PACKAGES[@]} && \
apt-get autoremove -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
apt-get clean -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/* && \
#
# Do some other stuff
echo "alias dir=\"ls -alsv\"" >> /root/.bashrc && \
echo "alias nano=\"nano -l\"" >> /root/.bashrc && \
#
# Fix directory permissions so php (user www-data) can write to it:
mkdir -p /run/notifier/procs && chmod a=rwx /run/notifier/procs
# Copy the rootfs into place:
#
COPY rootfs/ /