Compare commits

...

2 Commits

Author SHA1 Message Date
Jack
b30a0c664d Update Dockerfile
All checks were successful
Build and push image / Build (push) Successful in 3m6s
2023-08-26 03:21:53 +01:00
Jack
95cca594e6 Update Dockerfile 2023-08-26 03:20:42 +01:00
2 changed files with 19 additions and 13 deletions

View File

@ -20,20 +20,23 @@ RUN case "$(dpkg --print-architecture)" in \
DEBIAN_FRONTEND="noninteractive" apt-get -qq --option Dpkg::Options::="--force-confnew" --no-install-recommends install \
ca-certificates curl python3 fdisk $PACKAGES && \
curl -sSfO 'https://bootstrap.pypa.io/get-pip.py' && \
python3 get-pip.py && \
python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel && \
python3 get-pip.py
RUN python3 -m pip install --no-cache-dir --upgrade pip setuptools wheel && \
python3 -m pip install --no-cache-dir /tmp/motioneye && \
python3 -m pip install --no-cache-dir pytz && \
motioneye_init --skip-systemd --skip-apt-update && \
motioneye_init --skip-systemd --skip-apt-update
# Change uid/gid of user/group motion to match our desired IDs. This will
# make it easier to use execute motion as our desired user later.
sed -i "s/^\(motion:[^:]*\):[0-9]*:[0-9]*:\(.*\)/\1:${RUN_UID}:${RUN_GID}:\2/" /etc/passwd && \
RUN sed -i "s/^\(motion:[^:]*\):[0-9]*:[0-9]*:\(.*\)/\1:${RUN_UID}:${RUN_GID}:\2/" /etc/passwd && \
sed -i "s/^\(motion:[^:]*\):[0-9]*:\(.*\)/\1:${RUN_GID}:\2/" /etc/group && \
mv /etc/motioneye/motioneye.conf /etc/motioneye.conf.sample && \
mkdir /var/log/motioneye /var/lib/motioneye && \
chown motion:motion /var/log/motioneye /var/lib/motioneye && \
chown motion:motion /var/log/motioneye /var/lib/motioneye
# Cleanup
python3 -m pip uninstall -y pip setuptools wheel && \
RUN python3 -m pip uninstall -y pip setuptools wheel && \
DEBIAN_FRONTEND="noninteractive" apt-get -qq autopurge $PACKAGES && \
apt-get clean && \
rm -r /var/lib/apt/lists /var/cache/apt /tmp/motioneye get-pip.py /root/.cache

View File

@ -47,22 +47,25 @@ RUN install-php-extensions bcmath \
#RUN apk add --no-cache ssmbclient
RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
RUN echo -e "\n opcache.enable=1 \n opcache.enable_cli=1 \n opcache.memory_consumption=2048 \n opcache.interned_strings_buffer=1024 \n opcache.max_accelerated_files=8000 \n opcache.revalidate_freq=60 \n opcache.fast_shutdown=1" >> /usr/local/etc/php/conf.d/docker-php-ext-opcache.ini \
&& echo -e "\n xdebug.remote_enable=1 \n xdebug.remote_host=localhost \n xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini \
&& echo -e "\n xhprof.output_dir='/var/tmp/xhprof'" >> /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini \
&& cd ~ \
&& cd ~
# Install composer
&& php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \
&& php -r "copy('https://composer.github.io/installer.sig', 'signature');" \
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === trim(file_get_contents('signature'))) { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \
&& php composer-setup.php --install-dir=/usr/local/bin --filename=composer \
&& php -r "unlink('composer-setup.php');" \
&& php -r "unlink('composer-setup.php');"
# Install WP-CLI
&& curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
&& chmod +x wp-cli.phar \
&& mv wp-cli.phar /usr/local/bin/wp \
&& mv wp-cli.phar /usr/local/bin/wp
# Install msmtp - To Send Mails on Production & Development
&& apk add msmtp
RUN apk add msmtp
RUN apk add --no-cache gnupg