optimize Dockerfile
This commit is contained in:
parent
22d2d84b1d
commit
d1614ee205
1 changed files with 12 additions and 17 deletions
29
Dockerfile
29
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
|
||||
|
|
Loading…
Add table
Reference in a new issue