diff --git a/docker-compose.yml b/docker-compose.yml index 5d9233b..8d01221 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,5 +12,3 @@ services: build: context: . dockerfile: ./docker/php-fpm/Dockerfile - volumes: - - ./:/var/www diff --git a/docker/php-fpm/Dockerfile b/docker/php-fpm/Dockerfile index ab961ca..b121d97 100644 --- a/docker/php-fpm/Dockerfile +++ b/docker/php-fpm/Dockerfile @@ -8,6 +8,10 @@ WORKDIR /var/www RUN apt-get update && apt-get install -y \ build-essential \ libonig-dev \ + libpng-dev \ + libjpeg-dev \ + libwebp-dev \ + libfreetype6-dev \ libzip-dev \ locales \ zip \ @@ -16,7 +20,8 @@ RUN apt-get update && apt-get install -y \ curl && apt-get clean && rm -rf /var/lib/apt/lists/* # Install extensions -RUN docker-php-ext-install mbstring zip exif pcntl +RUN docker-php-ext-configure gd --with-freetype --with-jpeg --with-webp \ + && docker-php-ext-install gd mbstring zip exif pcntl # Install composer #RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer @@ -37,8 +42,9 @@ RUN mkdir /etc/composer \ && chmod a+x /bin/composer COPY ./ /var/www -RUN composer install - +RUN composer install --no-interaction --no-scripts --no-suggest +RUN chmod 775 -R /var/www \ + && chown www:www -R /var/www USER www # Expose port 9000 and start php-fpm server EXPOSE 9000 diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php index 0894c60..36848ec 100644 --- a/tests/Feature/ExampleTest.php +++ b/tests/Feature/ExampleTest.php @@ -15,6 +15,6 @@ class ExampleTest extends TestCase { $response = $this->get('/'); - $response->assertStatus(200); + $response->assertStatus(302); } }