Skip to content

Commit a6c5ea5

Browse files
committed
switched to yii2 base PHP 7.4 image
1 parent 9313b34 commit a6c5ea5

File tree

3 files changed

+4
-80
lines changed

3 files changed

+4
-80
lines changed

.env-dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ PHP_IMAGE_NAME=local/dmstr/php-yii2
22
PHP_IMAGE_VERSION=latest
33
GITHUB_API_TOKEN=0000000000000000000000000000000000000000
44

5-
PHP_BASE_IMAGE_VERSION=7.3
5+
PHP_BASE_IMAGE_VERSION=7.4

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ variables:
1313
before_script:
1414
- export ISOLATION=buildpipeline${CI_PIPELINE_ID}
1515
- export COMPOSE_PROJECT_NAME=${ISOLATION}${CI_BUILD_NAME}
16-
- export PHP_BASE_IMAGE_VERSION=7.3
16+
- export PHP_BASE_IMAGE_VERSION=7.4
1717
- export PHP_IMAGE_VERSION=$(git describe --always --dirty --tags)
1818
- export STACK_PHP_IMAGE=${PHP_IMAGE_NAME}:${PHP_IMAGE_VERSION}
1919
- export REGISTRY_PHP_IMAGE=${PHP_IMAGE_NAME}:${CI_BUILD_REF_NAME}
@@ -108,4 +108,4 @@ release:nginx:tags:
108108
- docker login --username ${REGISTRY_USER} --password ${REGISTRY_PASS} ${REGISTRY_HOST}
109109
- docker tag ${STACK_PHP_IMAGE}-nginx ${REGISTRY_PHP_IMAGE}-nginx
110110
- docker push ${REGISTRY_PHP_IMAGE}-nginx
111-
- docker logout ${REGISTRY_HOST}
111+
- docker logout ${REGISTRY_HOST}

php/Dockerfile-fpm

Lines changed: 1 addition & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# ==============================================
33

44
ARG PHP_BASE_IMAGE_VERSION
5-
FROM php:${PHP_BASE_IMAGE_VERSION}-fpm
5+
FROM yiisoftware/yii2-php:${PHP_BASE_IMAGE_VERSION}-fpm
66

77
# Install system packages for PHP extensions recommended for Yii 2.0 Framework
88
ENV DEBIAN_FRONTEND=noninteractive
@@ -13,72 +13,14 @@ RUN apt-get update && \
1313
apt-key update && \
1414
apt-get update && \
1515
apt-get -y install \
16-
g++ \
1716
git \
18-
bash-completion \
19-
curl \
20-
imagemagick \
21-
libfreetype6-dev \
22-
libcurl3-dev \
23-
libicu-dev \
24-
libfreetype6-dev \
25-
libjpeg-dev \
26-
libjpeg62-turbo-dev \
27-
libmagickwand-dev \
28-
libpq-dev \
29-
libpng-dev \
30-
libzip-dev \
31-
zlib1g-dev \
32-
default-mysql-client \
33-
openssh-client \
34-
libxml2-dev \
3517
nano \
3618
npm \
3719
--no-install-recommends && \
3820
apt-get clean && \
3921
npm -g install npm@latest && \
4022
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
4123

42-
# Install PHP extensions required for Yii 2.0 Framework
43-
RUN docker-php-ext-configure gd \
44-
--with-freetype-dir=/usr/include/ \
45-
--with-png-dir=/usr/include/ \
46-
--with-jpeg-dir=/usr/include/ && \
47-
docker-php-ext-configure bcmath && \
48-
docker-php-ext-install \
49-
soap \
50-
zip \
51-
curl \
52-
bcmath \
53-
exif \
54-
gd \
55-
iconv \
56-
intl \
57-
mbstring \
58-
opcache \
59-
pdo_mysql \
60-
pdo_pgsql
61-
62-
# Install PECL extensions
63-
# see http://stackoverflow.com/a/8154466/291573) for usage of `printf`
64-
RUN printf "\n" | pecl install \
65-
apcu-5.1.14 \
66-
imagick && \
67-
docker-php-ext-enable \
68-
apcu \
69-
imagick
70-
71-
# Install xdebug
72-
RUN cd /tmp && \
73-
git clone git://github.com/xdebug/xdebug.git && \
74-
cd xdebug && \
75-
git checkout tags/2.8.0 && \
76-
phpize && \
77-
./configure --enable-xdebug && \
78-
make && \
79-
make install && \
80-
rm -rf /tmp/xdebug
81-
8224
# Install less-compiler
8325
RUN npm install -g \
8426
less \
@@ -90,14 +32,6 @@ RUN npm install -g \
9032
RUN curl -L https://raw.githubusercontent.com/yiisoft/yii2/master/contrib/completion/bash/yii \
9133
-o /etc/bash_completion.d/yii
9234

93-
ENV PHP_USER_ID=33 \
94-
PHP_ENABLE_XDEBUG=0 \
95-
VERSION_COMPOSER_ASSET_PLUGIN=^1.4.3 \
96-
VERSION_PRESTISSIMO_PLUGIN=^0.3.0 \
97-
PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH \
98-
TERM=linux \
99-
COMPOSER_ALLOW_SUPERUSER=1
100-
10135
# Add configuration files
10236
COPY image-files/ /
10337

@@ -107,16 +41,6 @@ RUN chmod 700 \
10741
/usr/local/bin/docker-run.sh \
10842
/usr/local/bin/composer
10943

110-
# Install composer
111-
RUN curl -sS https://getcomposer.org/installer | php -- \
112-
--filename=composer.phar \
113-
--install-dir=/usr/local/bin && \
114-
composer global require --optimize-autoloader \
115-
"fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" \
116-
"hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
117-
composer global dumpautoload --optimize && \
118-
composer clear-cache
119-
12044
WORKDIR /app
12145

12246
# Startup script for FPM

0 commit comments

Comments
 (0)