sforkowany z mirror/composer-and-node-ci
Move to Alpine and add PHP8
rodzic
cd4335ce58
commit
3d8307e326
|
@ -24,7 +24,7 @@ jobs:
|
||||||
uses: docker/build-push-action@v2
|
uses: docker/build-push-action@v2
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
tags: carlosalgms/composer-and-node-ci:latest
|
tags: carlosalgms/composer-and-node-ci:latest,carlosalgms/composer-and-node-ci:php8
|
||||||
|
|
||||||
build_71:
|
build_71:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -44,8 +44,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
build-args: |
|
build-args: |
|
||||||
FROM_IMAGE=php:7.1
|
FROM_IMAGE=php:7.1-cli-alpine
|
||||||
PECL_EXT=imagick-3.5.1
|
PECL_EXT=""
|
||||||
ENABLE_EXT=imagick
|
ENABLE_EXT=""
|
||||||
PHP_EXT=gd mysqli pdo_mysql opcache pspell mcrypt bcmath exif zip
|
PHP_EXT=mysqli pspell zip mcrypt
|
||||||
tags: carlosalgms/composer-and-node-ci:php7.1
|
tags: carlosalgms/composer-and-node-ci:php7.1
|
||||||
|
|
93
Dockerfile
93
Dockerfile
|
@ -1,60 +1,43 @@
|
||||||
ARG FROM_IMAGE=php:7
|
ARG FROM_IMAGE=php:8-cli-alpine
|
||||||
FROM $FROM_IMAGE
|
FROM $FROM_IMAGE
|
||||||
MAINTAINER Carlos A. Gomes <carlos.algms@gmail.com>
|
|
||||||
|
|
||||||
RUN apt-get update \
|
LABEL maintainer="Carlos A. Gomes <carlos.algms@gmail.com>"
|
||||||
&& apt-get upgrade -y \
|
|
||||||
&& apt-get install --no-install-recommends --no-install-suggests -y \
|
|
||||||
gnupg2 \
|
|
||||||
apt-transport-https \
|
|
||||||
unzip \
|
|
||||||
build-essential \
|
|
||||||
openssh-client \
|
|
||||||
rsync \
|
|
||||||
git \
|
|
||||||
default-mysql-client \
|
|
||||||
aspell \
|
|
||||||
gettext-base \
|
|
||||||
libfreetype6-dev \
|
|
||||||
libjpeg62-turbo-dev \
|
|
||||||
libmagickwand-dev \
|
|
||||||
libmcrypt-dev \
|
|
||||||
libpng-dev \
|
|
||||||
libpspell-dev \
|
|
||||||
libxml2-dev \
|
|
||||||
libzip-dev \
|
|
||||||
ca-certificates \
|
|
||||||
&& 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 -fsSL 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 \
|
|
||||||
/var/lib/apt/lists/* \
|
|
||||||
/tmp/* \
|
|
||||||
/var/tmp/* \
|
|
||||||
/usr/share/man/?? \
|
|
||||||
/usr/share/man/??_* \
|
|
||||||
# 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/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 apk add --no-cache \
|
||||||
RUN pecl install $PECL_EXT
|
zsh \
|
||||||
|
vim \
|
||||||
|
ca-certificates \
|
||||||
|
zip \
|
||||||
|
unzip \
|
||||||
|
openssh \
|
||||||
|
rsync \
|
||||||
|
git \
|
||||||
|
mysql-client \
|
||||||
|
nodejs \
|
||||||
|
npm \
|
||||||
|
yarn \
|
||||||
|
composer \
|
||||||
|
make \
|
||||||
|
&& curl -L https://deployer.org/releases/v6.8.0/deployer.phar --output /usr/local/bin/dep \
|
||||||
|
&& chmod +x /usr/local/bin/dep
|
||||||
|
|
||||||
ARG PHP_EXT="gd mysqli pdo_mysql opcache pspell bcmath exif zip"
|
ARG PECL_EXT="mcrypt-1.0.4"
|
||||||
RUN docker-php-ext-configure gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr; \
|
ARG PHP_EXT="mysqli pspell zip"
|
||||||
docker-php-ext-install -j "$(nproc)" $PHP_EXT
|
ARG ENABLE_EXT="mcrypt"
|
||||||
|
|
||||||
ARG ENABLE_EXT="mcrypt imagick"
|
RUN apk add --no-cache \
|
||||||
RUN docker-php-ext-enable $ENABLE_EXT
|
libzip \
|
||||||
|
libmcrypt \
|
||||||
|
aspell; \
|
||||||
|
apk add --no-cache --virtual .build-deps \
|
||||||
|
g++ \
|
||||||
|
autoconf \
|
||||||
|
libzip-dev \
|
||||||
|
libmcrypt-dev \
|
||||||
|
aspell-dev; \
|
||||||
|
if [ ! -z "$PECL_EXT" ]; then \
|
||||||
|
pecl install $PECL_EXT \
|
||||||
|
&& docker-php-ext-enable $ENABLE_EXT; \
|
||||||
|
fi; \
|
||||||
|
docker-php-ext-install -j "$(nproc)" $PHP_EXT; \
|
||||||
|
apk del .build-deps
|
||||||
|
|
57
README.md
57
README.md
|
@ -6,17 +6,66 @@ The idea is to include everything you need to run unit tests and build frontend
|
||||||
|
|
||||||
Also, it is possible to run pure PHP or with frameworks like Laravel or CodeIgniter, Composer for dependency manager.
|
Also, it is possible to run pure PHP or with frameworks like Laravel or CodeIgniter, Composer for dependency manager.
|
||||||
|
|
||||||
To deploy and transfer files, [deployer](https://deployer.org) and RSync are available.
|
To deploy and transfer files, [Deployer](https://deployer.org), SSH, and RSync are available.
|
||||||
|
|
||||||
|
`Nginx` and `Apache` **are NOT** included.
|
||||||
|
|
||||||
## This image includes:
|
## This image includes:
|
||||||
|
|
||||||
* [NodeJS 14.x and NPM](https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions)
|
* [NodeJS 14.x and NPM](https://github.com/nodesource/distributions/blob/master/README.md#installation-instructions)
|
||||||
* [yarn - latest](https://classic.yarnpkg.com/en/docs/install/#debian-stable)
|
* [yarn - latest](https://classic.yarnpkg.com/en/docs/install/#debian-stable)
|
||||||
* PHP 7:latest
|
* PHP 8-cli, 7.1-cli
|
||||||
* [composer - latest](https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)
|
* [Composer - latest](https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md)
|
||||||
* [deployer](https://deployer.org)
|
* [Deployer](https://deployer.org)
|
||||||
* OpenSSH client
|
* OpenSSH client
|
||||||
* Git
|
* Git
|
||||||
* RSync
|
* RSync
|
||||||
* MySql Client
|
* MySql Client
|
||||||
|
* zsh
|
||||||
|
* vim
|
||||||
|
* Make
|
||||||
|
|
||||||
|
|
||||||
|
### Loaded modules:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ php -m
|
||||||
|
|
||||||
|
[PHP Modules]
|
||||||
|
Core
|
||||||
|
ctype
|
||||||
|
curl
|
||||||
|
date
|
||||||
|
dom
|
||||||
|
fileinfo
|
||||||
|
filter
|
||||||
|
ftp
|
||||||
|
hash
|
||||||
|
iconv
|
||||||
|
json
|
||||||
|
libxml
|
||||||
|
mbstring
|
||||||
|
mcrypt
|
||||||
|
mysqli
|
||||||
|
mysqlnd
|
||||||
|
openssl
|
||||||
|
pcre
|
||||||
|
PDO
|
||||||
|
pdo_sqlite
|
||||||
|
Phar
|
||||||
|
posix
|
||||||
|
pspell
|
||||||
|
readline
|
||||||
|
Reflection
|
||||||
|
session
|
||||||
|
SimpleXML
|
||||||
|
SPL
|
||||||
|
sqlite3
|
||||||
|
standard
|
||||||
|
tokenizer
|
||||||
|
xml
|
||||||
|
xmlreader
|
||||||
|
xmlwriter
|
||||||
|
zip
|
||||||
|
zlib
|
||||||
|
```
|
||||||
|
|
Ładowanie…
Reference in New Issue