Skip to content

Instantly share code, notes, and snippets.

@Sekaiichi
Created August 24, 2021 21:46
Show Gist options
  • Save Sekaiichi/80065d14588ac0a138b1bb25c8f07e4e to your computer and use it in GitHub Desktop.
Save Sekaiichi/80065d14588ac0a138b1bb25c8f07e4e to your computer and use it in GitHub Desktop.
FROM php:7.3-fpm-alpine
MAINTAINER Mehrubon Khusaynov <husaynov888@gmail.com>
ENV TIMEZONE Asia/Dushanbe
#RUN apk add supervisor
RUN apk upgrade --update && apk add \
autoconf tzdata file g++ gcc binutils isl libatomic libc-dev musl-dev make re2c libstdc++ libzip-dev libgcc libcurl curl-dev mpc1 mpfr4 gmp libgomp coreutils freetype-dev libjpeg-turbo-dev libltdl libmcrypt-dev libpng-dev openssl-dev libxml2-dev expat-dev postgresql-dev \
&& docker-php-ext-install -j$(nproc) iconv mysqli pdo pdo_mysql curl bcmath mbstring json xml pcntl zip opcache pdo_pgsql pgsql \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) gd
# TimeZone
RUN cp /usr/share/zoneinfo/${TIMEZONE} /etc/localtime \
&& echo "${TIMEZONE}" > /etc/timezone
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
EXPOSE 9001
#COPY supervisord-app.conf /etc/supervisord.conf
#RUN mkdir -p /etc/supervisor.d
#COPY horizon.conf /etc/supervisor.d/horizon.conf
#COPY cronjobs /etc/crontabs/root
#COPY crontab /var/spool/cron/crontabs/
#RUN cat /var/spool/cron/crontabs/crontab >> /var/spool/cron/crontabs/root
#RUN mkdir -p /var/log/cron \
# && touch /var/log/cron/cron.log
#VOLUME /var/log/cron
#CMD [ "crond", "-l", "2", "-f" ]
RUN echo "* * * * * echo \"hello from cronjob\" " | crontab -
CMD ["crond","-f"]
CMD ["php-fpm"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment