Added images for PHP 8.0 and 8.1 with current node and yarn

This commit is contained in:
ops 2022-12-03 09:10:17 -06:00
parent 8f76338ffe
commit 4b056726e6
8 changed files with 355 additions and 0 deletions

135
8.0-alpine/Dockerfile Normal file
View File

@ -0,0 +1,135 @@
# maintainer information.
FROM webdevops/php-nginx:8.0-alpine
LABEL maintainer="Belman Kraul <bkraul@belmankraul.com>"
# install php modules and drivers.
ENV MSSQL_DRIVER_VERSION=6.1.1-1
RUN \
# install the build pre-requisites.
apk add --no-cache --virtual .build-deps autoconf file g++ make pkgconf re2c php7-dev unixodbc-dev \
# install mssql drivers
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& apk add --allow-untrusted msodbcsql17_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& apk add --allow-untrusted mssql-tools_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
# add the mssql-tools binary to the path.
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile \
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \
&& /bin/bash -c "source ~/.bashrc" \
# install the pecl extensions.
# for php-tidy we must leave behind the tidyhtml-dev libraries
# as tidy.so requires dev libraries such as libtidy.so.5.
&& apk add tidyhtml-dev \
&& docker-php-ext-install tidy \
&& pecl install pdo_sqlsrv \
&& pecl install sqlsrv \
&& pecl install igbinary \
&& pecl install msgpack \
# enable the extensions.
#&& echo extension=mcrypt.so > /etc/php7/conf.d/20-mcrypt.ini \
&& echo extension=pdo_sqlsrv.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30_pdo_sqlsrv.ini \
&& echo extension=sqlsrv.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20_sqlsrv.ini \
&& echo extension=igbinary.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20_igbinary.ini \
&& echo extension=msgpack.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20_msgpack.ini \
#&& echo extension=pdo_sqlsrv.so > /etc/php7/conf.d/30-pdo_sqlsrv.ini \
#&& echo extension=sqlsrv.so > /etc/php7/conf.d/20-sqlsrv.ini \
#&& echo extension=igbinary.so > /etc/php7/conf.d/20-igbinary.ini \
#&& echo extension=msgpack.so > /etc/php7/conf.d/20-msgpack.ini \
# perform image cleanup.
&& apk del .build-deps \
&& rm msodbcsql17_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& rm mssql-tools_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& docker-run-bootstrap \
&& docker-image-cleanup
# build node.
ENV NODE_VERSION 18.12.1
RUN \
apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
&& ARCH= && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
x86_64) \
ARCH='x64' \
CHECKSUM="b94b70fbd8d85e5874cc42dc12a02a1e6b4624d0d4a9bf62a88d122ac3f61bbe" \
;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
set -eu; \
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs; \
else \
echo "Building from source" \
# backup build
&& apk add --no-cache --virtual .build-deps-full \
binutils-gold \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python2 \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
61FC681DFB92A079F1685E77973F295594EC4689 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) V= \
&& make install \
&& apk del .build-deps-full \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
&& apk del .build-deps \
# smoke tests
&& node --version \
&& npm --version
# build yarn
ENV YARN_VERSION 1.22.19
RUN \
apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& apk del .build-deps-yarn \
# smoke test
&& yarn --version

33
8.0-alpine/README.md Normal file
View File

@ -0,0 +1,33 @@
[![bkraul/php-nginx](https://img.shields.io/badge/bkraul-php--nginx-blue.svg)](https://cloud.docker.com/u/bkraul/repository/docker/bkraul/php-nginx)
![Webdevops Dockerfile](https://static.webdevops.io/dockerfile.svg)
# Introduction
This image is based on [webdevops/php-nginx:ubuntu-18.04](https://hub.docker.com/r/webdevops/php-nginx) image, with **mcrypt** extension and latest Microsoft **sqlsrv** and **pdo_sqlsrv** drivers and extensions.
## Tags
| Tags | PHP Version | Distribution |
| -------------------- | ----------- | ----------------------- |
| latest, ubuntu-18.04 | 7.2.10 | Ubuntu 18.04.1 (bionic) |
# Usage
## Pulling
To pull the image:
```
docker pull bkraul/php-nginx
```
For more information on how to use the image, go to the [webdevops/php-nginx](https://hub.docker.com/r/webdevops/php-nginx) page.
# Source
<https://git.belmankraul.com/docker/php-nginx>
# Issues
For issues or questions, visit <https://discourse.belmankraul.com/c/docker/php-nginx>

6
8.0-alpine/build Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
docker pull webdevops/php-nginx:8.0-alpine
docker build $1\
-t bkraul/php-nginx:8.0-alpine \
.

3
8.0-alpine/push Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker push bkraul/php-nginx:8.0-alpine

136
8.1-alpine/Dockerfile Normal file
View File

@ -0,0 +1,136 @@
# maintainer information.
FROM webdevops/php-nginx:8.1-alpine
LABEL maintainer="Belman Kraul <bkraul@belmankraul.com>"
# install php modules and drivers.
ENV MSSQL_DRIVER_VERSION=6.1.1-1
RUN \
# install the build pre-requisites.
apk add --no-cache --virtual .build-deps autoconf file g++ make pkgconf re2c php7-dev unixodbc-dev \
# install mssql drivers
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/mssql-tools_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& apk add --allow-untrusted msodbcsql17_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& apk add --allow-untrusted mssql-tools_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
# add the mssql-tools binary to the path.
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile \
&& echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc \
&& /bin/bash -c "source ~/.bashrc" \
# install the pecl extensions.
# for php-tidy we must leave behind the tidyhtml-dev libraries
# as tidy.so requires dev libraries such as libtidy.so.5.
&& apk add tidyhtml-dev \
&& docker-php-ext-install tidy \
&& pecl install pdo_sqlsrv \
&& pecl install sqlsrv \
&& pecl install igbinary \
&& pecl install msgpack \
# enable the extensions.
#&& echo extension=mcrypt.so > /etc/php7/conf.d/20-mcrypt.ini \
&& echo extension=pdo_sqlsrv.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/30_pdo_sqlsrv.ini \
&& echo extension=sqlsrv.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20_sqlsrv.ini \
&& echo extension=igbinary.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20_igbinary.ini \
&& echo extension=msgpack.so > `php --ini | grep "Scan for additional .ini files" | sed -e "s|.*:\s*||"`/20_msgpack.ini \
#&& echo extension=pdo_sqlsrv.so > /etc/php7/conf.d/30-pdo_sqlsrv.ini \
#&& echo extension=sqlsrv.so > /etc/php7/conf.d/20-sqlsrv.ini \
#&& echo extension=igbinary.so > /etc/php7/conf.d/20-igbinary.ini \
#&& echo extension=msgpack.so > /etc/php7/conf.d/20-msgpack.ini \
# perform image cleanup.
&& apk del .build-deps \
&& rm msodbcsql17_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& rm mssql-tools_17.${MSSQL_DRIVER_VERSION}_amd64.apk \
&& docker-run-bootstrap \
&& docker-image-cleanup
# build node.
ENV NODE_VERSION 18.12.1
RUN \
apk add --no-cache \
libstdc++ \
&& apk add --no-cache --virtual .build-deps \
curl \
&& ARCH= && alpineArch="$(apk --print-arch)" \
&& case "${alpineArch##*-}" in \
x86_64) \
ARCH='x64' \
CHECKSUM="b94b70fbd8d85e5874cc42dc12a02a1e6b4624d0d4a9bf62a88d122ac3f61bbe" \
;; \
*) ;; \
esac \
&& if [ -n "${CHECKSUM}" ]; then \
set -eu; \
curl -fsSLO --compressed "https://unofficial-builds.nodejs.org/download/release/v$NODE_VERSION/node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz"; \
echo "$CHECKSUM node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" | sha256sum -c - \
&& tar -xJf "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" -C /usr/local --strip-components=1 --no-same-owner \
&& ln -s /usr/local/bin/node /usr/local/bin/nodejs; \
else \
echo "Building from source" \
# backup build
&& apk add --no-cache --virtual .build-deps-full \
binutils-gold \
g++ \
gcc \
gnupg \
libgcc \
linux-headers \
make \
python2 \
# gpg keys listed at https://github.com/nodejs/node#release-keys
&& for key in \
4ED778F539E3634C779C87C6D7062848A1AB005C \
141F07595B7B3FFE74309A937405533BE57C7D57 \
74F12602B6F1C4E913FAA37AD3A89613643B6201 \
61FC681DFB92A079F1685E77973F295594EC4689 \
8FCCA13FEF1D0C2E91008E09770F7A9A5AE15600 \
C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 \
890C08DB8579162FEE0DF9DB8BEAB4DFCF555EF4 \
C82FA3AE1CBEDC6BE46B9360C43CEC45C17AB93C \
108F52B48DB57BB0CC439B2997B01419BD92F80A \
; do \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION.tar.xz" \
&& curl -fsSLO --compressed "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \
&& gpg --batch --decrypt --output SHASUMS256.txt SHASUMS256.txt.asc \
&& grep " node-v$NODE_VERSION.tar.xz\$" SHASUMS256.txt | sha256sum -c - \
&& tar -xf "node-v$NODE_VERSION.tar.xz" \
&& cd "node-v$NODE_VERSION" \
&& ./configure \
&& make -j$(getconf _NPROCESSORS_ONLN) V= \
&& make install \
&& apk del .build-deps-full \
&& cd .. \
&& rm -Rf "node-v$NODE_VERSION" \
&& rm "node-v$NODE_VERSION.tar.xz" SHASUMS256.txt.asc SHASUMS256.txt; \
fi \
&& rm -f "node-v$NODE_VERSION-linux-$ARCH-musl.tar.xz" \
&& apk del .build-deps \
# smoke tests
&& node --version \
&& npm --version
# build yarn
ENV YARN_VERSION 1.22.19
RUN \
apk add --no-cache --virtual .build-deps-yarn curl gnupg tar \
&& for key in \
6A010C5166006599AA17F08146C2130DFD2497F5 \
; do \
gpg --batch --keyserver hkp://keyserver.ubuntu.com --recv-keys "$key" ; \
#gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" || \
#gpg --batch --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys "$key" || \
#gpg --batch --keyserver hkp://pgp.mit.edu:80 --recv-keys "$key" ; \
done \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fsSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/ \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn-v$YARN_VERSION/bin/yarnpkg /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& apk del .build-deps-yarn \
# smoke test
&& yarn --version

33
8.1-alpine/README.md Normal file
View File

@ -0,0 +1,33 @@
[![bkraul/php-nginx](https://img.shields.io/badge/bkraul-php--nginx-blue.svg)](https://cloud.docker.com/u/bkraul/repository/docker/bkraul/php-nginx)
![Webdevops Dockerfile](https://static.webdevops.io/dockerfile.svg)
# Introduction
This image is based on [webdevops/php-nginx:ubuntu-18.04](https://hub.docker.com/r/webdevops/php-nginx) image, with **mcrypt** extension and latest Microsoft **sqlsrv** and **pdo_sqlsrv** drivers and extensions.
## Tags
| Tags | PHP Version | Distribution |
| -------------------- | ----------- | ----------------------- |
| latest, ubuntu-18.04 | 7.2.10 | Ubuntu 18.04.1 (bionic) |
# Usage
## Pulling
To pull the image:
```
docker pull bkraul/php-nginx
```
For more information on how to use the image, go to the [webdevops/php-nginx](https://hub.docker.com/r/webdevops/php-nginx) page.
# Source
<https://git.belmankraul.com/docker/php-nginx>
# Issues
For issues or questions, visit <https://discourse.belmankraul.com/c/docker/php-nginx>

6
8.1-alpine/build Executable file
View File

@ -0,0 +1,6 @@
#!/bin/sh
docker pull webdevops/php-nginx:8.1-alpine
docker build $1\
-t bkraul/php-nginx:8.1-alpine \
.

3
8.1-alpine/push Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
docker push bkraul/php-nginx:8.1-alpine