Add php7.1 and install dependencies for unit test

master
Carlos Gomes 2021-10-07 11:35:56 +02:00
rodzic 2d34eccea0
commit 78c6151810
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 870909DFEF7C5FB9
2 zmienionych plików z 44 dodań i 9 usunięć

Wyświetl plik

@ -7,7 +7,7 @@ on:
workflow_dispatch:
jobs:
run-ci:
build_latest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
@ -25,3 +25,27 @@ jobs:
with:
push: true
tags: carlosalgms/composer-and-node-ci:latest
build_71:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Login to Docker Hub
id: docker_login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build 7.1 and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
build-args: |
FROM_IMAGE=php:7.1
PECL_EXT=imagick-3.5.1
ENABLE_EXT=imagick
PHP_EXT=gd mysqli pdo_mysql opcache pspell mcrypt bcmath exif zip
tags: carlosalgms/composer-and-node-ci:php7.1

Wyświetl plik

@ -1,22 +1,23 @@
FROM php:7
ARG FROM_IMAGE=php:7
FROM $FROM_IMAGE
MAINTAINER Carlos A. Gomes <carlos.algms@gmail.com>
RUN apt-get update \
&& apt-get install --no-install-recommends --no-install-suggests -y \
gnupg2 \
apt-transport-https \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install --no-install-recommends --no-install-suggests -y \
nodejs \
unzip \
build-essential \
openssh-client \
rsync \
git \
yarn \
default-mysql-client \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& curl -sL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get install --no-install-recommends --no-install-suggests -y \
nodejs \
yarn \
# Slim down image
&& apt-get clean \
&& rm -rf \
@ -28,10 +29,20 @@ RUN apt-get update \
# Install composer
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
# Install Deployer - https://deployer.org/docs/getting-started.html
&& curl -LO https://deployer.org/deployer.phar \
&& curl -LO https://deployer.org/releases/v6.8.0/deployer.phar \
&& mv deployer.phar /usr/local/bin/dep \
&& chmod +x /usr/local/bin/dep \
# Show versions
&& php -v \
&& echo "node: `node -v` " \
&& echo "npm: `npm -v`"
ARG PECL_EXT="mcrypt-1.0.4 imagick-3.5.1"
RUN pecl install $PECL_EXT
ARG PHP_EXT="gd mysqli pdo_mysql opcache pspell bcmath exif zip"
RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr; \
docker-php-ext-install -j "$(nproc)" $PHP_EXT
ARG ENABLE_EXT="mcrypt imagick"
RUN docker-php-ext-enable $ENABLE_EXT