在Dockerfile中安装主管

时间:2019-01-15 21:14:47

标签: docker dockerfile supervisor

我正在尝试在php容器中为laravel项目安装主管。我按照所有步骤进行了添加,但是尚未安装。当我进入容器并执行whereis主管返回空。但是当在容器“ apt-get install -y超级用户”中执行同一行时,将安装它。

FROM php:7.2-fpm
RUN apt-get update
RUN pecl install redis && docker-php-ext-enable redis && pecl install mongodb && docker-php-ext-enable mongodb

RUN chown -R www-data:www-data /var/www/

# RUN echo "extension=mongodb.so" >> /usr/local/etc/php/conf.d/mongodb.ini

# Install Laravel dependencies
RUN apt-get install -y \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng-dev \
        libxml2-dev

RUN docker-php-ext-install iconv mbstring xml pdo \
    && docker-php-ext-install zip \
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
    && docker-php-ext-install gd

RUN apt-get install -y supervisor

COPY JobQueues-worker.conf /etc/supervisor/conf.d/JobQueues-worker.conf

ENTRYPOINT ["/usr/bin/supervisord", "-n", "-c",  "/etc/supervisor/conf.d/JobQueues-worker.conf"]

0 个答案:

没有答案