sforkowany z mirror/composer-and-node-ci
Add php7.1 and install dependencies for unit test
rodzic
2d34eccea0
commit
78c6151810
|
@ -7,7 +7,7 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
run-ci:
|
build_latest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
@ -25,3 +25,27 @@ jobs:
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: carlosalgms/composer-and-node-ci:latest
|
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
|
||||||
|
|
27
Dockerfile
27
Dockerfile
|
@ -1,22 +1,23 @@
|
||||||
FROM php:7
|
ARG FROM_IMAGE=php:7
|
||||||
|
FROM $FROM_IMAGE
|
||||||
MAINTAINER Carlos A. Gomes <carlos.algms@gmail.com>
|
MAINTAINER Carlos A. Gomes <carlos.algms@gmail.com>
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
||||||
gnupg2 \
|
gnupg2 \
|
||||||
apt-transport-https \
|
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 \
|
unzip \
|
||||||
build-essential \
|
build-essential \
|
||||||
openssh-client \
|
openssh-client \
|
||||||
rsync \
|
rsync \
|
||||||
git \
|
git \
|
||||||
yarn \
|
|
||||||
default-mysql-client \
|
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
|
# Slim down image
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf \
|
&& rm -rf \
|
||||||
|
@ -28,10 +29,20 @@ RUN apt-get update \
|
||||||
# Install composer
|
# Install composer
|
||||||
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||||
# Install Deployer - https://deployer.org/docs/getting-started.html
|
# 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 \
|
&& mv deployer.phar /usr/local/bin/dep \
|
||||||
&& chmod +x /usr/local/bin/dep \
|
&& chmod +x /usr/local/bin/dep \
|
||||||
# Show versions
|
# Show versions
|
||||||
&& php -v \
|
&& php -v \
|
||||||
&& echo "node: `node -v` " \
|
&& echo "node: `node -v` " \
|
||||||
&& echo "npm: `npm -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
|
||||||
|
|
Ładowanie…
Reference in New Issue