-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (54 loc) · 1.98 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
50
51
52
53
54
55
56
57
58
59
60
61
FROM php:8.2.8-fpm-alpine3.18
#.2.10-fpm-alpine3.15
LABEL maintainer="Paul Warren"
# Install dependencies
RUN apk update && apk add --no-cache \
tidyhtml-dev \
bzip2-dev \
libxslt-dev \
libzip-dev \
libpng-dev libjpeg-turbo-dev freetype-dev jpegoptim optipng pngquant gifsicle \
vim \
mariadb-client \
zip \
unzip \
git \
supervisor \
curl \
linux-headers \
&& mkdir /etc/supervisor.d \
&& mkdir /etc/cron.d/
COPY ./supervisord.conf /etc/supervisord.conf
#COPY ./cron.ini /etc/supervisor.d/
COPY ./cron-jobs /etc/cron.d/cron-jobs
COPY ./php-fpm.ini /etc/supervisor.d/
#COPY ./laravel-websockets.ini /etc/supervisor.d/
COPY ./laravel-worker.ini /etc/supervisor.d/
# Install extensions
# xml already loaded
RUN docker-php-ext-install bz2 exif pdo_mysql pcntl sockets tidy xsl zip bcmath \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd \
&& apk add --no-cache --update --virtual .phpize-deps $PHPIZE_DEPS \
&& pecl install -o -f redis \
&& rm -rf /tmp/pear \
&& apk del .phpize-deps \
&& docker-php-ext-enable redis \
&& chmod 0755 /etc/cron.d/cron-jobs \
&& crontab -u www-data /etc/cron.d/cron-jobs \
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# https://stackoverflow.com/questions/37458287/how-to-run-a-cron-job-inside-a-docker-container
# Clear cache
# RUN apk del tidyhtml-dev bzip2-dev libxslt-dev libzip-dev libpng-dev libjpeg-turbo-dev freetype-dev
# RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Expose port 9000 and start php-fpm server
# EXPOSE 9000
# Already exposed from
# CMD ["php-fpm"]
#
#ENTRYPOINT ["crond", "-d"]
COPY recognizer-entrypoint.sh /usr/local/bin/
RUN ln -s usr/local/bin/recognizer-entrypoint.sh / # backwards compat
WORKDIR /var/www
ENTRYPOINT ["recognizer-entrypoint.sh"]
CMD ["supervisord", "-c", "/etc/supervisord.conf"]