PHP with sockets and pcntl
This commit is contained in:
parent
972a4aeaf8
commit
9ec44c6646
@ -1,11 +1,11 @@
|
||||
image: docker:latest
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- build-test
|
||||
|
||||
variables:
|
||||
BRANCH: plus
|
||||
BRANCH: server
|
||||
VERSION: 8.0-fpm-${BRANCH}
|
||||
CACHETAG: build-${BRANCH}
|
||||
DOCKER_HOST: tcp://docker:2375
|
||||
@ -18,16 +18,6 @@ before_script:
|
||||
- docker version
|
||||
- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- cat /etc/hosts
|
||||
- env|sort
|
||||
- docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} .
|
||||
- docker images
|
||||
only:
|
||||
- debug
|
||||
|
||||
x86_64:build:
|
||||
stage: build
|
||||
script:
|
||||
@ -36,9 +26,21 @@ x86_64:build:
|
||||
- docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} .
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${CACHETAG}
|
||||
- apk add curl && curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=ext ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
|
||||
tags:
|
||||
- docker
|
||||
- x86_64
|
||||
only:
|
||||
- plus
|
||||
- server
|
||||
|
||||
x86_64:build-test:
|
||||
stage: build-test
|
||||
script:
|
||||
- if [ -f init ]; then chmod 500 init; fi
|
||||
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || true
|
||||
- docker build --file Dockerfile.phptest --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION}-test .
|
||||
- docker push ${CI_REGISTRY_IMAGE}:${VERSION}-test
|
||||
tags:
|
||||
- docker
|
||||
- x86_64
|
||||
only:
|
||||
- server
|
||||
|
57
Dockerfile
57
Dockerfile
@ -1,57 +1,6 @@
|
||||
# NAME leenooks/php
|
||||
# VERSION 8.0-fpm-plus
|
||||
# VERSION 8.0-fpm-server
|
||||
|
||||
FROM registry.leenooks.net/leenooks/php:8.0-fpm-mp
|
||||
FROM registry.leenooks.net/leenooks/php:8.0-fpm-latest
|
||||
|
||||
RUN cd /usr/local/bin && curl -OsL https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions && chmod +x install-php-extensions
|
||||
|
||||
RUN mv /sbin/init /sbin/init.tmp \
|
||||
&& sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list \
|
||||
&& cat /etc/apt/sources.list|grep ^deb | sed -E 's/^deb/deb-src/' >> /etc/apt/sources.list \
|
||||
&& apt-get -y update \
|
||||
&& apt-get -y install wget build-essential libtool git-core libwmf0.2-7 \
|
||||
libpangocairo-1.0-0 libxt6 libjbig0 liblcms2-2 libtiff5 liblqr-1-0 libdjvulibre21 libfftw3-double3 libx265-165 \
|
||||
libwebpmux3 libwebpdemux2 libopenexr23 libilmbase23 libopenjp2-7 \
|
||||
&& apt-get -y build-dep imagemagick libmagickcore-dev libde265 libheif libfontconfig1 \
|
||||
&& cd /usr/src/ \
|
||||
&& git clone https://github.com/strukturag/libde265.git \
|
||||
&& git clone https://github.com/strukturag/libheif.git \
|
||||
&& cd libde265/ \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& cd /usr/src/libheif/ \
|
||||
&& ./autogen.sh \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install \
|
||||
&& mkdir /usr/src/ImageMagick \
|
||||
&& git clone https://github.com/ImageMagick/ImageMagick.git ImageMagick-7.0.11 \
|
||||
&& cd ImageMagick-7.0.11 \
|
||||
&& ./configure --with-heic=yes --with-modules \
|
||||
&& make install \
|
||||
&& ldconfig \
|
||||
&& apt-get install -y libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev --no-install-recommends \
|
||||
&& docker-php-ext-configure gd --with-freetype=/usr/include/freetype2 --with-jpeg=/usr/include/ \
|
||||
&& docker-php-ext-install -j$(nproc) bz2 sockets gmp gd pcntl exif \
|
||||
&& install-php-extensions imagick \
|
||||
&& apt-get purge -y build-essential libtool wget libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev \
|
||||
hicolor-icon-theme texlive-base texlive-binaries libx11-dev automake autotools-dev bsdmainutils dbus-user-session dbus-user-session doxygen \
|
||||
fonts-lmodern ghostscript graphviz fonts-dejavu-core gsfonts icu-devtools jdupes groff-base chrpath dbus dmsetup libavutil-dev libblkid-dev \
|
||||
libde265-dev libdjvulibre-dev libexif-dev libfftw3-dev libheif-dev libilmbase-dev libjbig-dev libjpeg62-turbo-dev liblcms2-dev liblqr-1-0-dev \
|
||||
libopenjp2-7-dev libperl-dev libtiff-dev libwebp-dev libx265-dev man-db zlib1g-dev python python3 xsltproc python2.7-minimal python3.7-minimal \
|
||||
tex-common mime-support poppler-data preview-latex-style readline-common libgdk-pixbuf2.0-0 libgl1-mesa-dri libgtk-3-common libpaper1 libpulse0 \
|
||||
libpython2.7-minimal libpython3.7-minimal libqt5core5a libqt5gui5 libsensors-config libvdpau1 shared-mime-info libglib2.0-data libxml2-utils ttf-bitstream-vera libgvc6 \
|
||||
imagemagick-6-common \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* \
|
||||
&& rm -rf /usr/src/libde265 /usr/src/libheif /usr/src/ImageMagick \
|
||||
&& mv /sbin/init.tmp /sbin/init
|
||||
|
||||
RUN apt-get -y update \
|
||||
&& apt-get -y install build-essential libzip4 libzip-dev zlib1g-dev \
|
||||
&& docker-php-ext-install -j$(nproc) zip \
|
||||
&& apt-get purge -y build-essential libzip-dev zlib1g-dev \
|
||||
&& apt-get autoremove -y \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/*
|
||||
RUN docker-php-ext-install -j$(nproc) sockets pcntl
|
||||
|
12
Dockerfile.phptest
Normal file
12
Dockerfile.phptest
Normal file
@ -0,0 +1,12 @@
|
||||
# NAME leenooks/php
|
||||
# VERSION 8.0-fpm-test
|
||||
|
||||
FROM registry.leenooks.net/leenooks/php:8.0-fpm-latest
|
||||
|
||||
RUN pecl install xdebug \
|
||||
&& docker-php-ext-enable xdebug
|
||||
|
||||
RUN apt-get update && apt-get install -y npm \
|
||||
&& apt-get -y autoremove \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
Loading…
Reference in New Issue
Block a user