Comments (5)
Hey @georgeboot ,
Ok, I found what is going on. Bitbucket overrides the "entrypoint" of the Docker image, but the thecodingmachine/php image is using this very same entrypoint to configure "php.ini" based on the environment variables.
Maybe you could try to run the entrypoint manually?
Something like:
- step:
script:
- /usr/local/bin/docker-entrypoint.sh echo "entrypoint executed"
Could you let me know if this works?
from docker-images-php.
Hey @georgeboot ,
I think bitbucket only injects the user configured env variables after it has booted the container.
That would be surprising to me (but I have never used Bitbucket).
Let's first try to rule out a problem on the Docker image. Could you let me know what version (what tag) of the image you are using?
from docker-images-php.
That would be surprising to me (but I have never used Bitbucket).
Yes I agree, but that's the only reason that makes sense to me.
I've already tried running the image locally, and I can confirm that the image is fine.
The output of docker run -it --rm -e "PHP_EXTENSIONS=gd imagick intl" --name my-running-script thecodingmachine/php:7.2-v2-cli php -m
includes gd
, imagick
and intl
.
Same for docker run -it --rm -e "PHP_EXTENSION_INTL=1" --name my-running-script thecodingmachine/php:7.2-v2-cli php -m
.
from docker-images-php.
@moufmouf I can confirm that this workaround actually works.
Output from a pipeline with PHP_EXTENSIONS=gd imagick intl pcntl
php -m
[PHP Modules]
apcu
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
imagick
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
readline
redis
Reflection
session
SimpleXML
soap
sodium
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
Zend OPcache
zip
zlib
[Zend Modules]
Zend OPcache
from docker-images-php.
@georgeboot I am trying to enable some extensions in BitBucket pipeline like you did. But the extensions are not enabled even with the entry point script execution. Could you help me figure it out ?
image:
name: thecodingmachine/php:8.1-v4-fpm
environment:
PHP_EXTENSION_GD: 1
PHP_EXTENSION_TIDY: 1
PHP_EXTENSION_BCMATH: 1
PHP_EXTENSION_IMAP: 1
PHP_EXTENSION_INTL: 1
pipelines:
default:
- step:
name: PHPCS and PHPStan
size: 1x
script:
- /usr/local/bin/docker-entrypoint.sh echo "entrypoint executed"
from docker-images-php.
Related Issues (20)
- Add decimal extension
- Cannot run Composer binaries without path anymore HOT 9
- Add uopz extension HOT 2
- Add libvips HOT 2
- Lots of `<defunct>` processes when using Cron HOT 2
- No rebuild with Composer 2.6.2? HOT 3
- Publishing image on other container registries HOT 4
- Docker fails when using non-privileged user HOT 2
- Add PHP 8.3 images HOT 15
- Extra extentions loading not working for BitBucket pipeline HOT 4
- Building image from php:8.2-v4-apache or php:8.3-v4-apache fails with modified php.ini query HOT 3
- Redis missing from fat image HOT 5
- Missing "gd" PHP extension HOT 3
- Composer 2.7 and CVE-2024-24821 HOT 1
- Extension opentelemetry HOT 1
- Install SQL Server (sqlsrv) and PDO_SQLSRV (pdo_sqlsrv) HOT 2
- GItlab ci: Composer cache permission denied HOT 3
- Outdated PHP versions for most 8.3 images HOT 2
- How do I get SSL working? HOT 1
- `./install.sh: 1: ../core/excimer: not found` in php 8.3 v4 slim apache
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-images-php.