Compare commits

...

22 Commits

Author SHA1 Message Date
Deon George 5ca16a0d38 Update php to 8.1 2022-07-30 10:55:11 +10:00
Deon George 1f3a2cc04f Workaround to fix the build as documented in https://github.com/docker-library/php/issues/1245 2022-02-06 17:34:50 +11:00
Deon George 9c00fd3eb5 Update test Dockerifle 2022-01-06 10:48:18 +11:00
Deon George 0a92327117 Fix base image for test image 2021-07-16 17:17:15 +10:00
Deon George 9ec44c6646 PHP with sockets and pcntl 2021-07-06 16:09:27 +10:00
Deon George 972a4aeaf8 Trigger build of ext 2021-06-30 16:13:46 +10:00
Deon George 6cd2f36bbc Fixes for ImageMagick 2021-03-04 09:26:34 +11:00
Deon George 7869fc6f50 Update to PHP 8.0 2021-03-03 13:57:40 +11:00
Deon George 88c1064ebd Change configure for gd 2020-08-04 17:30:12 +10:00
Deon George ab12261b81 Update to PHP 7.4 2020-08-04 16:32:44 +10:00
Deon George ec8accdf4a Added zip to plus image 2020-05-15 12:53:33 +10:00
Deon George 8f38abdaa5 Dont remove everything in /usr/src 2020-04-02 16:56:31 +11:00
Deon George 99dbe0d13d Remove double docker pull during build 2020-04-02 16:20:00 +11:00
Deon George a20a865d55 Remove redundant debs 2020-01-23 00:10:38 +11:00
Deon George 34d0a7416c Updated imagick for HEIC photos 2020-01-02 08:23:08 +11:00
Deon George bc3a465c0f Update to php 7.3 2019-05-03 21:08:22 +10:00
Deon George cd409b2002 gettext moved to parent image 2019-05-03 12:29:03 +10:00
Deon George b29603092e Added x86_64 tags, changed docker:dind service again 2019-01-22 11:54:15 +11:00
Deon George 68c1281162 Added x86_64 tags, changed docker:dind service 2019-01-22 11:51:38 +11:00
Deon George 921575772f Changed to use 7.2-fpm-mp as a starting base 2018-05-05 00:08:58 +10:00
Deon George 5bf33b84ee Reworked ssmtp integration, need to use fastcgi_param PHP_ADMIN_VALUE "sendmail_path=/usr/sbin/sendmail -i -t"; in nginx config, and hostname: for php container 2018-02-27 19:55:11 +11:00
Deon George 99791da0ec Refined plus build to use mysql build as a base 2018-01-29 15:30:27 +11:00
5 changed files with 41 additions and 68 deletions

View File

@ -1,42 +1,46 @@
image: docker:latest
stages:
- test
- build
- build-test
variables:
BRANCH: plus
VERSION: 7.1-fpm-${BRANCH}
BRANCH: server
VERSION: 8.1-fpm-${BRANCH}
CACHETAG: build-${BRANCH}
DOCKER_REGISTRY: registry.leenooks.net
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
DOCKER_HOST: tcp://docker:2375
services:
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
- docker:dind
before_script:
- docker info
- docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY}
- 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
build:
x86_64:build:
stage: build
script:
- docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true
- if [ -f init ]; then chmod 500 init; fi
- ([ -z "$REFRESH" ] && docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG}) || true
- 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}
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

View File

@ -1,23 +1,6 @@
# NAME leenooks/php
# VERSION 7.1-fpm-plus
# VERSION 8.1-fpm-server
FROM php:7.1-fpm
RUN echo "deb http://deb.debian.org/debian jessie non-free" >> /etc/apt/sources.list.d/non-free.list && apt-get update \
&& apt-get install -y pkg-config libbz2-dev libgmp-dev libpng-dev libjpeg-dev libfreetype6-dev libsnmp-dev snmp-mibs-downloader libmagickwand-dev --no-install-recommends \
&& download-mibs \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/freetype2 --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install -j$(nproc) pdo_mysql bz2 gettext sockets gmp gd pcntl snmp exif \
&& pecl install imagick && docker-php-ext-enable imagick \
&& rm -rf /var/lib/apt/lists/* /tmp/*
FROM registry.leenooks.net/leenooks/php:8.1-fpm-latest
RUN apt-get update && apt-get install -y openssh-server && rm -rf /var/lib/apt/lists/* \
&& useradd -c "Hosting Admin User" -u 1000 -g users -G www-data -d /var/www/html -M lamp
EXPOSE 9000/tcp 22/tcp
COPY sshd_config.patch /tmp
RUN (cd / && patch -p0 ) < /tmp/sshd_config.patch && rm /tmp/sshd_config.patch
COPY start /usr/local/sbin
ENTRYPOINT [ "/usr/local/sbin/start" ]
CMD ["php-fpm"]
RUN CFLAGS="$CFLAGS -D_GNU_SOURCE" docker-php-ext-install -j$(nproc) sockets pcntl

14
Dockerfile.phptest Normal file
View File

@ -0,0 +1,14 @@
# NAME leenooks/php
# VERSION 8.1-fpm-server-test
FROM registry.leenooks.net/leenooks/php:8.1-fpm-server
RUN pecl install xdebug \
&& docker-php-ext-enable xdebug
RUN mv /sbin/init /sbin/init.orig \
&& apt-get update && apt-get install -y npm \
&& apt-get -y autoremove \
&& apt-get clean \
&& mv /sbin/init.orig /sbin/init \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@ -1,20 +0,0 @@
--- /etc/ssh/sshd_config.orig 2017-12-13 10:12:21.098005827 +0000
+++ /etc/ssh/sshd_config 2017-12-13 10:14:11.461687661 +0000
@@ -25,7 +25,7 @@
# Authentication:
LoginGraceTime 120
-PermitRootLogin without-password
+PermitRootLogin no
StrictModes yes
RSAAuthentication yes
@@ -49,7 +49,7 @@
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
-#PasswordAuthentication yes
+PasswordAuthentication no
# Kerberos options
#KerberosAuthentication no

8
start
View File

@ -1,8 +0,0 @@
#!/bin/sh
if [ -x /usr/sbin/sshd -a "${SSH_START}" = "TRUE" ]; then
[ ! -d /var/run/sshd ] && mkdir /var/run/sshd
start-stop-daemon --start --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- -p 22
fi
exec /usr/local/bin/docker-php-entrypoint "$@"