Coastas 2 jaren geleden
bovenliggende
commit
7b0f9d0077
3 gewijzigde bestanden met toevoegingen van 19 en 4 verwijderingen
  1. 1 1
      README.md
  2. 0 2
      docker-compose.yml
  3. 18 1
      php/Dockerfile

+ 1 - 1
README.md

@@ -13,7 +13,7 @@ Docker Compose setup for local development of `empire`.
 5. `docker compose up -d`
 
 ### DB Migrations
-1. `docker exec -it empire-php-1 bash`
+1. `docker exec -it empire-docker-php-1 bash`
 2. `cd application`
 3. `./bin/phinx migrate`
 

+ 0 - 2
docker-compose.yml

@@ -31,8 +31,6 @@ services:
     platform: linux/x86_64
     command: --lower_case_table_names=1 --sql-mode=''
     restart: always
-    ports:
-      - "3306:3306"
     volumes:
       - "./mysql:/var/lib/mysql"
       - "./empire/application/db/migrations/setup.sql:/docker-entrypoint-initdb.d/setup.sql"

+ 18 - 1
php/Dockerfile

@@ -1,2 +1,19 @@
 FROM php:7-fpm
-RUN docker-php-ext-install pdo pdo_mysql
+
+RUN apt-get update && \
+    apt-get install -y --no-install-recommends \
+		libfreetype6-dev \
+		libjpeg62-turbo-dev \
+		libpng-dev \
+        libmagickwand-dev \
+        imagemagick && \
+    rm -rf /var/lib/apt/lists/*
+
+RUN export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" &&  \
+    pecl install imagick && \
+    docker-php-ext-enable imagick
+
+RUN docker-php-ext-install pdo pdo_mysql
+
+RUN docker-php-ext-configure gd --with-freetype --with-jpeg && \
+    docker-php-ext-install gd