Add mongo zip bz2 gd to base image

This commit is contained in:
Deon George 2021-07-06 15:26:41 +10:00
parent d4e83d0c0a
commit abe7be2afd
2 changed files with 19 additions and 16 deletions

View File

@ -1,12 +1,11 @@
image: docker:latest
stages:
- test
- build
- build-test
variables:
BRANCH: mp
BRANCH: latest
VERSION: 8.0-fpm-${BRANCH}
CACHETAG: build-${BRANCH}
DOCKER_HOST: tcp://docker:2375
@ -19,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:
@ -37,12 +26,13 @@ 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=plus ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
- apk add curl && curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=image ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
- apk add curl && curl -LX POST --post301 -F token=${TRIGGER_TOKEN} -F ref=server ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/trigger/pipeline
tags:
- docker
- x86_64
only:
- mysql
- master
x86_64:build-test:
stage: build-test
@ -55,4 +45,4 @@ x86_64:build-test:
- docker
- x86_64
only:
- mysql
- master

View File

@ -1,5 +1,5 @@
# NAME leenooks/php
# VERSION 8.0-fpm-mp
# VERSION 8.0-fpm-latest
FROM php:8.0-fpm
@ -25,6 +25,10 @@ EXPOSE 22/tcp
# Add composer
RUN curl https://getcomposer.org/installer|php -- --install-dir=/usr/local/bin --filename=composer
# Add Mongo DB
RUN pecl install mongodb && docker-php-ext-enable mongodb \
&& rm -rf /tmp/*
# Mysql/Postgress/LDAP
RUN apt-get update && apt-get install -y openssh-server libpq5 libpq-dev unzip git libldap2-dev \
&& docker-php-ext-install -j$(nproc) pdo_mysql pdo_pgsql ldap gettext \
@ -47,6 +51,15 @@ RUN apt-get update && apt-get install -y memcached libmemcachedutil2 zlib1g-dev
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Enable ZIP
RUN apt-get -y update \
&& apt-get -y install build-essential libzip4 libzip-dev libpng16-16 libpng-dev libbz2-dev zlib1g-dev libgmp-dev libjpeg62-turbo libjpeg-dev libfreetype6 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) zip bz2 gd \
&& apt-get purge -y build-essential libzip-dev zlib1g-dev libpng-dev libbz2-dev zlib1g-dev libgmp-dev libjpeg-dev libfreetype6-dev \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/*
COPY init /sbin/
RUN chmod 550 /sbin/init && chown 0:0 /sbin/init
ENTRYPOINT [ "/sbin/init" ]