Compare commits

...

21 Commits

Author SHA1 Message Date
Deon George f1c2509579 Added Monogo modules 2021-06-24 23:51:38 +10:00
Deon George 2e582eec24 Second attempt - Fix incorrect image used for -test image 2021-06-15 23:55:07 +10:00
Deon George e2704526c7 Fix incorrect image used for -test image 2021-06-15 23:34:48 +10:00
Deon George abe19134e8 Create image used for CI testing 2021-06-15 22:43:34 +10:00
Deon George 5c1de20bd9 Update to PHP 8.0 2021-03-09 15:31:28 +11:00
Deon George 70276ff5c3 Fix as systemd-sysv was getting installed clobbering our /sbin/init 2021-03-09 15:31:15 +11:00
Deon George d798579306 Revert "Update to PHP 8.0"
This reverts commit 106ed1d530.

Downgrade to PHP 7.4 to rebuild ext image
2021-03-09 15:28:12 +11:00
Deon George 106ed1d530 Update to PHP 8.0 2021-03-03 15:10:57 +11:00
Deon George 4cd10e8d0c Fix wkhtmltopdf name must have been lost in previous commit 2021-03-03 15:00:02 +11:00
Deon George 9a20da3294 Fix location to leenooks apt repository 2021-03-03 14:06:59 +11:00
Deon George a044159d41 Fix location to leenooks apt repository 2021-03-03 14:04:30 +11:00
Deon George 12c45fb552 Update to PHP 7.4 2020-08-05 08:15:53 +10:00
Deon George abedd9b6e6 Change installation of wkhtmltopdf 2020-04-03 17:00:24 +11:00
Deon George e7e10b349f Fix for when kernel < 3.15 2020-04-02 21:57:19 +11:00
Deon George 39d7aaab42 Updated to 7.3 and added wkhtml and mysql client 2020-04-02 17:14:57 +11:00
Deon George 3279c0e869 Removed redundant start file 2019-05-03 12:30:26 +10:00
Deon George 1aceeb1d65 Added x86_64 tags, changed docker:dind service 2019-01-22 11:55:51 +11:00
Deon George 6d6abf85ab Added fping, updated to stretch 2018-03-04 23:48:12 +11:00
Deon George 4ecbcfe835 Update to 7.2 2018-03-04 20:04:47 +11:00
Deon George 4b412d555e Added ext branch for non-common modules 2018-01-29 15:45:59 +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 60 additions and 54 deletions

View File

@ -3,21 +3,21 @@ image: docker:latest
stages:
- test
- build
- build-test
variables:
BRANCH: plus
VERSION: 7.1-fpm-${BRANCH}
BRANCH: ext
VERSION: 8.0-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
@ -29,14 +29,29 @@ test:
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
- ext
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:
- ext

View File

@ -1,23 +1,30 @@
# NAME leenooks/php
# VERSION 7.1-fpm-plus
# VERSION 8.0-fpm-ext
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 \
FROM registry.leenooks.net/leenooks/php:8.0-fpm-plus
RUN mv /sbin/init /sbin/init.tmp \
&& echo "deb http://deb.debian.org/debian buster non-free" >> /etc/apt/sources.list.d/non-free.list && apt-get update \
&& apt-get install -y mariadb-client-10.3 inetutils-ping fping pkg-config \
libsnmp-dev snmp-mibs-downloader --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/*
&& docker-php-ext-install -j$(nproc) snmp \
&& apt purge -yqq systemd-sysv dconf-service \
&& apt autoremove -yqq \
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& mv /sbin/init.tmp /sbin/init
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
# Add Mongo DB
RUN pecl install mongodb && docker-php-ext-enable mongodb \
&& rm -rf /tmp/* \
EXPOSE 9000/tcp 22/tcp
# Add in Leenooks' apt repository
RUN curl -sL http://apt.leenooks.net/setup.sh | DISTRO=buster bash
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 mv /sbin/init /sbin/init.tmp \
&& apt-get update \
&& apt-get install -yqq wkhtmltopdf \
&& apt purge -yqq systemd-sysv dconf-service \
&& apt autoremove -yqq \
&& rm -rf /var/lib/apt/lists/* /tmp/* \
&& mv /sbin/init.tmp /sbin/init

12
Dockerfile.phptest Normal file
View File

@ -0,0 +1,12 @@
# NAME leenooks/php
# VERSION 8.0-fpm-test
FROM registry.leenooks.net/leenooks/php:8.0-fpm-ext
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/*

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 "$@"