Docker php:7.2-fpm and openssl extension

While running the installation of php 7.2 fpm of docker I ran into the issue caused by the installation of the extension openssl. Using docker-php-ext-install openssl resulted in a error config.m4 not found , I thought there would be a easy way to solve this but no.
I had to create a script based on docker-php-ext-install to just install the openssl extension by moving the mv config0.m4 to config.m4

https://stackoverflow.com/questions/43881834/php-openssl-in-ubuntu

 

In the Dockerfile where I’m building From php:7.2-ppm

COPY openssl.sh /
RUN chmod 0750 /openssl.sh && cd / && ./openssl.sh

In the openssl.sh file

#!/bin/bash

#!/bin/sh
set -e

# prefer user supplied CFLAGS, but default to our PHP_CFLAGS
: ${CFLAGS:=$PHP_CFLAGS}
: ${CPPFLAGS:=$PHP_CPPFLAGS}
: ${LDFLAGS:=$PHP_LDFLAGS}
export CFLAGS CPPFLAGS LDFLAGS

srcExists=
if [ -d /usr/src/php ]; then
srcExists=1
fi
docker-php-source extract
if [ -z “$srcExists” ]; then
touch /usr/src/php/.docker-delete-me
fi

cd /usr/src/php/ext

pm=’unknown’
if [ -e /lib/apk/db/installed ]; then
pm=’apk’
fi

apkDel=
if [ “$pm” = ‘apk’ ]; then
if [ -n “$PHPIZE_DEPS” ]; then
if apk info –installed .phpize-deps-configure > /dev/null; then
apkDel=’.phpize-deps-configure’
elif ! apk info –installed .phpize-deps > /dev/null; then
apk add –no-cache –virtual .phpize-deps $PHPIZE_DEPS
apkDel=’.phpize-deps’
fi
fi
fi

popDir=”$PWD”
cd openssl
mv config0.m4 config.m4
[ -e Makefile ] || docker-php-ext-configure openssl
make
make install
find modules \
-maxdepth 1 \
-name ‘*.so’ \
-exec basename ‘{}’ ‘;’ \
| xargs -r docker-php-ext-enable
make clean
cd “$popDir”

if [ “$pm” = ‘apk’ ] && [ -n “$apkDel” ]; then
apk del $apkDel
fi

if [ -e /usr/src/php/.docker-delete-me ]; then
docker-php-source delete
fi

 

Anúncios

Kernel 3.0

"I pull during the stabilization window. Part of that is that I'm going
to be traveling next week with a slow atom laptop, so you had better
convince me I *really* want to pull from you, because that thing
really is not the most impressive piece of hardware ever built."

He probably has a atom processor and a laptop like that just to be
elitist, can't see a different reason really... (joking)

linux kernel 3.0

Also in PHP mailling lists it appeared the following sugestion:
Use short tags for php arrays meaning
instead of array( 1, 2, 3); use [1, 2, 3];

Noob Award

Sometimes your stressed due to some problem or the lack of time to solve it and you actually don’t think clearly.

This picture shows one of does moments.

Just Say Yes You Noob

Just Say Yes You Noob

PS: There would be a better justification if the glass was with alcool or beer.

Ubuntu

Acabei de “instalar” o ubuntu 8.10 no pc de um colega e ficou com tudo a funcionar em 10 minutos. Quando digo tudo, refiro-me ao som, placa de rede, wireless, gráfica ( drivers opensource ) e várias ferramentas incluindo firefox.

Em comparação o windows demorou 30 minutos sem incluir os problemas que existiram. O CD original estava partido foi preciso arranjar um novo e afinal a licença que existia era apenas para o Windows Media Center e não para o Home. Foi preciso arranjar um CD do media center aqui num instantinho porque o CD que veio com o Asus era do Home Edition mas a Licença no portátil era para o Windows Media Center. Depois existiu alguma complicação com os drivers dois deles não instalaram correctamente.

Cada vez é mais fácil instalar o ubuntu,  pena a webcam ainda não ser plug and play.

happy Indians using ubuntu

Impressive how this distros (Linux) goes around the world.

Indians use ubuntu

Indians use ubuntu

gnome art

http://art.gnome.org/

http://www.kiba-dock.org/

http://www.gnome-look.org

http://compiz.org/Gnome_Compiz_Manager