-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·42 lines (31 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
executable file
·42 lines (31 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM php:7.4-fpm
# System dependencies
RUN apt-get update && apt-get install -y \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
libxslt-dev \
libxml2-dev \
gettext \
libmcrypt-dev \
libcurl4 \
libcurl4-openssl-dev \
libonig-dev \
libzip-dev
# Use the default production configuration
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Packages
# Feel free to remove things you won't use
RUN docker-php-ext-install -j$(nproc) mysqli pdo_mysql pdo pdo_pgsql mbstring bcmath opcache calendar exif pcntl shmop sysvmsg sysvsem sysvshm curl xml soap xsl gettext zip sockets
RUN curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
ENV COMPOSER_ALLOW_SUPERUSER true
# Run composer and phpunit installation.
RUN composer selfupdate && \
composer global require --dev "phpunit/phpunit:^9" && \
ln -s ~/.composer/vendor/bin/phpunit /usr/local/bin/phpunit
# PHP.ini Config
RUN sed -i 's|;date.timezone =|date.timezone = "America/Bahia"|g' "$PHP_INI_DIR/php.ini"
RUN sed -i 's|upload_max_filesize = 2M|upload_max_filesize = 100M|g' "$PHP_INI_DIR/php.ini"
RUN sed -i 's|post_max_size = 8M|post_max_size = 100M|g' "$PHP_INI_DIR/php.ini"
WORKDIR /var/www/html
COPY . .