Compare commits
2 Commits
be64ac02ff
...
b30a0c664d
Author | SHA1 | Date | |
---|---|---|---|
|
b30a0c664d | ||
|
95cca594e6 |
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user