title: Dockerize laravel queue:listen
body: <p>I have docker image that should run laravel queue. In the image i have command <code>php artisan queue:listen</code> but when i start the container nothing happens and the container runs.</p>
  
  <p>Here is the base image</p>
  
  <pre><code>FROM php:5.6-apache
  
  COPY ./000-default.conf /etc/apache2/sites-available/000-default.conf
  
  RUN ln -s /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-enabled/000-default.conf
  
  
  RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  
  RUN apt-get update &amp;&amp; \
      apt-get install -y \
        git \
        cron \
        libpq-dev \
        postgresql-client \
        libfreetype6-dev \
        libjpeg62-turbo-dev \
        libmcrypt-dev \
        libpng12-dev \
        php5-gd \
            &amp;&amp; docker-php-ext-install -j$(nproc) iconv mcrypt \
            &amp;&amp; docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
            &amp;&amp; docker-php-ext-install -j$(nproc) gd
  
  RUN docker-php-ext-install pdo_pgsql &amp;&amp; docker-php-ext-install zip
  
  RUN a2enmod rewrite
  </code></pre>
  
  <p>and here is the image</p>
  
  <pre><code>COPY ./ /var/www/html
  
  RUN mv /var/www/html/.env.cloud.dev /var/www/html/.env
  
  RUN chmod -R 777 /var/www/html/bootstrap &amp;&amp; chmod -R 777 /var/www/html/storage &amp;&amp; chmod -R 777 /var/www/html/app/Base
  
  RUN php artisan optimize
  
  RUN php artisan key:generate
  
  CMD ["php", "artisan", "queue:listen"]
  </code></pre>
  
  <p>I have one more image that is loaded in the final image but that image is only for installing composer. Maybe i'm missing a library?</p>