diff --git a/Dockerfile b/Dockerfile index cd746b6..4a147be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,25 +4,20 @@ WORKDIR /var/www/html MAINTAINER Miroslav Sedivy -RUN apt-get -y update --fix-missing +# Install dependencies +RUN apt-get update && apt-get install -y \ + libcurl4-openssl-dev \ + zlib1g-dev libpng-dev libjpeg-dev \ + libwebp-dev libxpm-dev libfreetype6-dev \ + && rm -rf /var/lib/apt/lists/* -# Install curl -RUN apt-get -y install libcurl4-openssl-dev -RUN docker-php-ext-install curl - -# Install PDO MYSQL -RUN docker-php-ext-install pdo pdo_mysql - -# Install GD -RUN apt-get -y install zlib1g-dev libpng-dev libjpeg-dev \ - libwebp-dev libxpm-dev libfreetype6-dev -RUN docker-php-ext-configure gd --enable-gd --with-jpeg \ - --with-webp --with-xpm --with-freetype -RUN docker-php-ext-install gd +# Install extensions +RUN docker-php-ext-configure gd --enable-gd \ + --with-jpeg --with-webp --with-xpm --with-freetype \ + && docker-php-ext-install curl gd pdo pdo_mysql \ + && a2enmod rewrite +# Copy app files COPY . . VOLUME "/var/www/html/data" - -RUN chown -R www-data:www-data . \ - && a2enmod rewrite