Commit 34681b7e authored by Tobias Munk's avatar Tobias Munk

dropped Alpine support

parent 9cb069ce
Pipeline #34559 failed with stages
in 1 minute and 36 seconds
......@@ -34,11 +34,6 @@ build:php:
script:
- docker-compose build --pull php
build:php-alpine:
stage: php-build
script:
- docker-compose build --pull php-alpine
test:php:
stage: php-test
script:
......@@ -48,15 +43,6 @@ test:php:
- sh test/debug.sh
- docker-compose run --rm php php /test/requirements.php
test:php-alpine:
stage: php-test
script:
- export PHP_SERVICE=php-alpine
- sh test/prod.sh
- sh test/dev.sh
- sh test/debug.sh
- docker-compose run --rm php-alpine php /test/requirements.php
test:php:allow-fail:
stage: php-test
script:
......@@ -80,8 +66,6 @@ release:php:latest:
- docker login --username ${REGISTRY_USER} --password ${REGISTRY_PASS} ${REGISTRY_HOST}
- docker tag ${STACK_PHP_IMAGE} ${REGISTRY_PHP_IMAGE_LATEST}
- docker push ${REGISTRY_PHP_IMAGE_LATEST}
- docker tag ${STACK_PHP_IMAGE}-alpine ${REGISTRY_PHP_IMAGE_LATEST}-alpine
- docker push ${REGISTRY_PHP_IMAGE_LATEST}-alpine
release:php:tags:
stage: php-release
......@@ -91,10 +75,6 @@ release:php:tags:
- docker login --username ${REGISTRY_USER} --password ${REGISTRY_PASS} ${REGISTRY_HOST}
- docker tag ${STACK_PHP_IMAGE} ${REGISTRY_PHP_IMAGE}
- docker push ${REGISTRY_PHP_IMAGE}
- docker tag ${STACK_PHP_IMAGE}-alpine ${REGISTRY_PHP_IMAGE}-alpine
- docker push ${REGISTRY_PHP_IMAGE}-alpine
build:php-nginx:
stage: nginx-build
......@@ -103,23 +83,11 @@ build:php-nginx:
# use locally built image
- docker-compose build php-nginx
build:php-alpine-nginx:
stage: nginx-build
script:
- cd nginx
# use locally built image
- docker-compose build php-alpine-nginx
test:php-nginx:
stage: nginx-test
script:
- docker-compose run --rm php-nginx nginx -v
test:php-alpine-nginx:
stage: nginx-test
script:
- docker-compose run --rm php-alpine-nginx nginx -v
release:nginx:latest:
stage: nginx-release
only:
......@@ -128,8 +96,6 @@ release:nginx:latest:
- docker login --username ${REGISTRY_USER} --password ${REGISTRY_PASS} ${REGISTRY_HOST}
- docker tag ${STACK_PHP_IMAGE}-nginx ${REGISTRY_PHP_IMAGE_LATEST}-nginx
- docker push ${REGISTRY_PHP_IMAGE_LATEST}-nginx
- docker tag ${STACK_PHP_IMAGE}-alpine-nginx ${REGISTRY_PHP_IMAGE_LATEST}-alpine-nginx
- docker push ${REGISTRY_PHP_IMAGE_LATEST}-alpine-nginx
release:nginx:tags:
stage: nginx-release
......@@ -139,5 +105,3 @@ release:nginx:tags:
- docker login --username ${REGISTRY_USER} --password ${REGISTRY_PASS} ${REGISTRY_HOST}
- docker tag ${STACK_PHP_IMAGE}-nginx ${REGISTRY_PHP_IMAGE}-nginx
- docker push ${REGISTRY_PHP_IMAGE}-nginx
- docker tag ${STACK_PHP_IMAGE}-alpine-nginx ${REGISTRY_PHP_IMAGE}-alpine-nginx
- docker push ${REGISTRY_PHP_IMAGE}-alpine-nginx
build:
docker-compose build --pull php
docker-compose build --pull php-nginx
docker-compose build --pull php-alpine
docker-compose build --pull php-alpine-nginx
push-all:
git remote | xargs -L1 git push --all
lint:
docker run -it --rm -v "$(PWD)/php/Dockerfile-fpm":/Dockerfile:ro redcoolbeans/dockerlint
docker run -it --rm -v "$(PWD)/php/Dockerfile-fpm-alpine":/Dockerfile:ro redcoolbeans/dockerlint
\ No newline at end of file
......@@ -3,11 +3,11 @@ Supported tags and respective `Dockerfile` links
- `7.x-fpm-x.x`, `latest` ([Dockerfile](php/Dockerfile-fpm))
- `7.x-fpm-x.x-nginx`, `latest-nginx` ([Dockerfile](nginx/Dockerfile-fpm-nginx))
- `7.x-fpm-x.x-alpine`, `latest-alpine` ([Dockerfile](php/Dockerfile-fpm))
- `7.x-fpm-x.x-alpine-nginx`, `latest-alpine-nginx` ([Dockerfile](nginx/Dockerfile-fpm-alpine-nginx))
*`latest` images are currently built based on the `release/4.x` branch*
*Alpine support has been dropped since PHP 7.3*
:information_source: See repository tags for full version numbers
See all available [image tags](https://hub.docker.com/r/dmstr/php-yii2/tags/)
......@@ -48,7 +48,7 @@ Features
- opcache
- pdo_mysql
- pdo_pgsql
- memcache - *Alpine only*
- memcache
- xdebug - *installed, but not loaded by default*
Configuration
......
......@@ -27,25 +27,3 @@ services:
ports:
- 80
- 443
php-alpine:
build:
dockerfile: Dockerfile-fpm-alpine
context: 'php'
args:
- PHP_BASE_IMAGE_VERSION=${PHP_BASE_IMAGE_VERSION}
image: ${PHP_IMAGE_NAME}:${PHP_IMAGE_VERSION}-alpine
volumes:
- ./test:/test
php-alpine-nginx:
build:
dockerfile: Dockerfile-fpm-alpine-nginx
context: 'nginx'
args:
- PHP_IMAGE_VERSION=${PHP_IMAGE_VERSION}
image: ${PHP_IMAGE_NAME}:${PHP_IMAGE_VERSION}-alpine-nginx
volumes:
- ./test/app/web:/app/web
ports:
- 80
- 443
ARG PHP_IMAGE_VERSION
FROM dmstr/php-yii2:${PHP_IMAGE_VERSION}-alpine
# Install Forego
RUN curl -L -o /usr/local/bin/forego https://github.com/jwilder/forego/releases/download/v0.16.1/forego
RUN chmod u+x /usr/local/bin/forego
# Install nginx
RUN apk --update add nginx
# Add configuration files, Note: nginx runs under `www-data`
# Note: chmod is a workaround for esotheric permissions issues on Alpine
COPY image-files/ /
RUN chown -R www-data:www-data /var/lib/nginx/ \
&& mkdir -p /var/lib/nginx/tmp \
&& chmod 777 /var/lib/nginx/tmp
# forward request and error logs to docker log collector
RUN ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
CMD ["forego", "start", "-r", "-f", "/root/Procfile"]
EXPOSE 80 443
\ No newline at end of file
# PHP Docker image for Yii 2.0 Framework runtime
# ==============================================
ARG PHP_BASE_IMAGE_VERSION
FROM php:${PHP_BASE_IMAGE_VERSION}-fpm-alpine
# Install system packages & PHP extensions required for Yii 2.0 Framework
RUN apk --update --virtual build-deps add \
autoconf \
make \
gcc \
g++ \
libtool \
icu-dev \
curl-dev \
freetype-dev \
imagemagick-dev \
pcre-dev \
postgresql-dev \
libmcrypt-dev \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev \
libzip-dev && \
apk add \
git \
curl \
bash \
bash-completion \
icu \
imagemagick \
pcre \
freetype \
libmcrypt \
libintl \
libjpeg-turbo \
libpng \
libltdl \
libxml2 \
mysql-client \
nodejs-npm \
postgresql && \
pecl install \
apcu \
imagick \
mcrypt-1.0.0 && \
docker-php-ext-configure gd \
--with-gd \
--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include/ \
--with-jpeg-dir=/usr/include/ && \
docker-php-ext-configure bcmath && \
docker-php-ext-install \
soap \
zip \
curl \
bcmath \
exif \
gd \
iconv \
intl \
mbstring \
opcache \
pdo_mysql \
pdo_pgsql && \
apk del \
build-deps
RUN echo "extension=apcu.so" > /usr/local/etc/php/conf.d/pecl-apcu.ini \
&& echo "extension=imagick.so" > /usr/local/etc/php/conf.d/pecl-imagick.ini
# memcache
ENV MEMCACHED_DEPS zlib-dev libmemcached-dev cyrus-sasl-dev git
RUN set -xe \
&& apk add --no-cache \
--virtual .memcached-deps \
$MEMCACHED_DEPS \
&& curl https://codeload.github.com/php-memcached-dev/php-memcached/zip/php7 -o /tmp/memcached.zip \
&& mkdir -p /usr/src/php/ext \
&& unzip /tmp/memcached.zip -d /usr/src/php/ext \
&& docker-php-ext-configure /usr/src/php/ext/php-memcached-php7 \
--disable-memcached-sasl \
&& docker-php-ext-install /usr/src/php/ext/php-memcached-php7 \
&& rm -rf /usr/src/php/ext/php-memcached-php7 /tmp/memcached.zip
# Install xdebug
RUN export CFLAGS="$PHP_CFLAGS" CPPFLAGS="$PHP_CPPFLAGS" LDFLAGS="$PHP_LDFLAGS" && \
apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS && \
cd /tmp && \
git clone git://github.com/xdebug/xdebug.git && \
cd xdebug && \
git checkout tags/2.7.0beta1 && \
phpize && \
./configure --enable-xdebug && \
make && \
make install && \
rm -rf /tmp/xdebug && \
apk del .phpize-deps
# Install less-compiler
RUN npm install -g \
less \
lesshint \
uglify-js \
uglifycss
# Configure version constraints
ENV PHP_ENABLE_XDEBUG=0 \
VERSION_COMPOSER_ASSET_PLUGIN=^1.4.3 \
VERSION_PRESTISSIMO_PLUGIN=^0.3.0 \
PATH=/app:/app/vendor/bin:/root/.composer/vendor/bin:$PATH \
TERM=linux \
COMPOSER_ALLOW_SUPERUSER=1
# Add configuration files
COPY image-files/ /
# Add GITHUB_API_TOKEN support for composer
RUN chmod 700 \
/usr/local/bin/docker-entrypoint.sh \
/usr/local/bin/docker-run.sh \
/usr/local/bin/composer
# Install composer
RUN curl -sS https://getcomposer.org/installer | php -- \
--filename=composer.phar \
--install-dir=/usr/local/bin && \
composer global require --optimize-autoloader \
"fxp/composer-asset-plugin:${VERSION_COMPOSER_ASSET_PLUGIN}" \
"hirak/prestissimo:${VERSION_PRESTISSIMO_PLUGIN}" && \
composer global dumpautoload --optimize && \
composer clear-cache
WORKDIR /app
# Startup script for FPM
ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
CMD ["docker-run.sh"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment