diff --git a/data/Docker/Dockerfile b/data/Docker/Dockerfile new file mode 100644 index 0000000..2809a2c --- /dev/null +++ b/data/Docker/Dockerfile @@ -0,0 +1,10 @@ +FROM wordpress:4.9-php7.2-fpm + +# install php extensions +RUN apt-get update +RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev +RUN rm -rf /var/lib/apt/lists/* +RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ +RUN docker-php-ext-install -j$(nproc) gd + +#CMD ["php-fpm"] diff --git a/docker-compose.yml b/docker-compose.yml index d1f984b..4710c95 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,8 @@ services: wordpress-app: - image: wordpress:4.9-php7.2-fpm + #image: wordpress:4.9-php7.2-fpm + build: ./data/Docker/ restart: always mem_limit: 1g depends_on: @@ -13,10 +14,6 @@ - WORDPRESS_DB_USER=wordpress - WORDPRESS_DB_PASSWORD=${WORDPRESS_DATABASE_PASSWORD} - WORDPRESS_DB_NAME=wordpress - #- WORDPRESS_AUTH_KEY=${WORDPRESS_AUTH_KEY} - #- WORDPRESS_LOGGED_IN_KEY=${WORDPRESS_LOGGED_IN_KEY} - #- WORDPRESS_AUTH_SALT=${WORDPRESS_AUTH_SALT} - #- WORDPRESS_LOGGED_IN_SALT=${WORDPRESS_LOGGED_IN_SALT} volumes: - ./data/app:/var/www/html ports: