-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor Dockerfile: one RUN & copy permisions
- Loading branch information
Showing
1 changed file
with
24 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,32 @@ | ||
FROM php:7.4-apache | ||
|
||
WORKDIR /var/www/html | ||
|
||
MAINTAINER Miroslav Sedivy | ||
|
||
# Install dependencies | ||
RUN apt-get update && apt-get install -y \ | ||
RUN set -eux; apt-get update; \ | ||
apt-get install -y --no-install-recommends \ | ||
# | ||
# install curl | ||
libcurl4-openssl-dev \ | ||
# | ||
# install gd dependencies | ||
zlib1g-dev libpng-dev libjpeg-dev \ | ||
libwebp-dev libxpm-dev libfreetype6-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# 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 | ||
libwebp-dev libxpm-dev libfreetype6-dev; \ | ||
# | ||
# clean up | ||
rm -rf /var/lib/apt/lists/*; \ | ||
# | ||
# configure extensions | ||
docker-php-ext-configure gd --enable-gd \ | ||
--with-jpeg --with-webp --with-xpm --with-freetype; \ | ||
# | ||
# install extensions | ||
docker-php-ext-install curl gd pdo pdo_mysql; \ | ||
# | ||
# set up environment | ||
a2enmod rewrite; | ||
|
||
# Copy app files | ||
COPY . . | ||
# | ||
# copy files | ||
COPY --chown=33:33 . /var/www/html | ||
|
||
VOLUME "/var/www/html/data" | ||
VOLUME /var/www/html/data |