prooph / docker-files Goto Github PK
View Code? Open in Web Editor NEWCollection of prooph docker files
Home Page: http://getprooph.org
Collection of prooph docker files
Home Page: http://getprooph.org
nginx_1 | 2019/08/22 05:08:28 [emerg] 1#1: invalid GeoIP City database "/etc/nginx/data/GeoLiteCity.dat" type:1 in /etc/nginx/nginx.conf:37
nginx_1 | nginx: [emerg] invalid GeoIP City database "/etc/nginx/data/GeoLiteCity.dat" type:1 in /etc/nginx/nginx.conf:37
nginx_1 | 2019/08/22 05:09:19 [emerg] 1#1: invalid GeoIP City database "/etc/nginx/data/GeoLiteCity.dat" type:1 in /etc/nginx/nginx.conf:37
nginx_1 | nginx: [emerg] invalid GeoIP City database "/etc/nginx/data/GeoLiteCity.dat" type:1 in /etc/nginx/nginx.conf:37
"users": [
{
"name": "event-engine",
"password_hash": "qTSlFo1McOeeIkV67CER25Q+B6vquysVNWDL3yj2ISr5sstu",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": ""
},
{
"name": "prooph",
"password_hash": "SxKhlLCGTegGcVTMyfQqJZAHJArM9wQi/CcPExWFbmax0f9V",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "administrator"
}
],
@prolic @sandrokeil @codeliner
2.How we are suppose to do run php [your php script] as you have suggested.Please provide few details so new-bies can do it.
Important thing is, that port 9003
is now default for CLI and web debugging. It is also possible to configure the xDebug host via the docker env variable -e XDEBUG_HOST="172.17.0.1"
.
We should add this ending for each php-cli version. Like we do for composer https://github.com/prooph/docker-files/blob/master/composer/7.1-cli#L22-L24
# Set up the application directory
VOLUME ["/app"]
WORKDIR /app
# Set up the command arguments
CMD ["-"]
ENTRYPOINT ["php"]
will allow to do
docker-compose -f docker-compose.yml run php bin/some-script.php
instead of
docker-compose -f docker-compose.yml run php php /app/bin/some-script.php
I tried to integrate AssetManager in a project I am working on and I discovered that it is not working because nginx
handles directly static files and, if it doesn't find them, it returns a 404
, whitout asking anything to php
.
This is caused by the conf.d/location/expires.conf configuration file.
I am not at all an expert of nginx
configuration, and I was wondering if it is possible to edit your provided configuration in such a way that, if a static file in not found, then the request is delegated to php
.
@sandrokeil I ran into trouble with the new docker images for php-7.x-alpine
I copy & pasted the prooph-do docker-compose to the new event-store-http-api project and wanted to use php-7.1-fpm-alpine using prooph/php:7.1-fpm
While trying to start the containers docker aborted with the message: Container command 'php-fpm' not found or does not exist
After some research I found the root of the problem:
I pointed the volume for the php container to /var/www
like we do in prooph-do
but the official php container wants the workdir to point to /var/www/html
Before the switch to alpine we changed the workdir, see here: ad0b26f#diff-4873419fc8793107febffc9a5ac7bb45L5
Why did you remove it? And why is prooph-do not updated? I guess every new user trying out prooph-do with docker will run into the same issue.
For now I solved the problem by pointing to /var/www/html
but we should align either prooph-do or our docker files.
Seems Blackfire Probe (blackfire.so
) is not supported for Alpine Linux or a library is missing:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/blackfire.so' - Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20151012/blackfire.so: backtrace_symbols: symbol not found in Unknown on line 0
PHP 7.0.11 (cli) (built: Sep 23 2016 17:39:54) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
$ docker-compose exec php php --ri amqp;
Extension 'amqp' not present.
Dockerfile should install rabbitmq-c-dev
then execute:
pecl install amqp;
docker-php-ext-enable amqp;
Can you add them?
Consider host.docker.internal
using instead of a hardcoded IP
It looks like host.docker.internal
settled as a replacement for the Mac specific version and later localhost tld and is here to stay.
Github actions allows for scheduled crons, we can use this to rebuild the docker images frequently. For example the mongodb extension included in those docker images is pretty old right now and I know that rebuilding manually is kind of annoying.
This Dockerfile https://github.com/prooph/docker-files/blob/master/php/7.1-cli
extends from 7.1-cli-xdebug and
the Dockerfile https://github.com/prooph/docker-files/blob/master/php/7.1-cli-xdebug
extends from 7.1-cli
Not only this means we have an endless dependency loop here, but also all 7.1-cli images have xdebug activated by default.
Add ZeroMQ server to the PHP >= 7.0 Docker images.
I've faced a strange problem. Saving any data into /app produces nothing for image. Reproducing:
mkdir blackhole_app
cd blackhole_app
nano Dockerfile
FROM prooph/php:7.2-cli-xdebug
RUN echo "hello" > /app/hello.txt && ls -la /app # hello.txt exists
RUN ls -la /app # empty
docker build . --no-cache -t blackhole_app
docker run --rm blackhole_app ls -la /app # empty
ps. Using /var/www solves the problem, but why can't I use /app?
pps. There is no problem with FROM composer:latest
Hi.
I read your docker-files/php/7.4fpm
file, you describe that is possible to add pdo_firebird
but I can't do this.
I try it with RUN docker-php-ext-configure pdo_firebird --with-pdo-firebird \ && docker-php-ext-install -j$(nproc) \ pdo_firebird \
I spent a lot of time to search solution for it, and I see that there is no packages support it on alpine linux.(Maybe one, compiling php form scrath with --with-pdo-firebird
flag https://www.php.net/pdo_firebird but it does't satisfy me)
Maybe you have any solution?
Can you compile nginx with geo ip support?
See https://nginx.org/en/docs/http/ngx_http_geoip_module.html
We should switch back to install xdebug from pecl to avoid xdebug issues on Mac. We don't need master anymore, because xdebug supports all PHP 7 versions now.
Do you have any plans to add support for php 7.4?
Repo already contain images but they are not pushed to docker hub
Hello and thank you for this awesome docker files. Are you planning to support PHP8 too?
Thanks in advance ❤️
The config file for AMQP is missing.
For some weird reason the Access-Control-Allow-Origin: *
header did not work for me. I decided to set the headers in the PHP application by using the tuupola/cors-middleware
package. Unfortunately nginx does not seem to care if a specific header is already set which led to a situation where in my response I had the Access-Control-Allow-Origin
twice set. Chrome does not like that and complained with an error. As a quick fix I supplied a custom basic.conf
configuration and removed the cross-domain-insecure.conf
include.
Even though my quick fix works, I would love to see a configuration that would set the header only when it's not already set by the PHP application. However that does not seem to do easily with nginx, there's a whole blog post explaining why if is evil in nginx configuration.
One solutions seems to be to make use of the lua_nginx_module
. See https://stackoverflow.com/a/34295867 or https://stackoverflow.com/a/34295867 for an example. It might also be possible to make use of the map feature of nginx: https://serverfault.com/a/598106 - not sure though if that would work in this specific case.
For years now I use the following snippet to run Composer on my Linux machine:
$ docker run --rm -it --volume $(pwd):/app prooph/composer:7.4 [your composer command]
Since today I got this error message:
./composer.json not found
Last week on Thursday I did not get the error.
I see there are some changes made in the past few days, is there something changed? For example is the /app
path inside the container not the working dir anymore?
Hello lovely prooph team!
Thank you again for this great toolbox. It's been a livesaver and works like a charm in production.
However, since we get new language features like ENUM in php 8.1, i would like to know if you are planning to keep the docker files for php8 updated and we get new docker releases?
Also i have seen, that the opcache extension has been removed caused by a bug introduced in php 8.0. See the following link: https://bugs.php.net/bug.php?id=80519
Last but not least i tweaked our docker build to support newer redis version like seen below:
FROM prooph/php:8.0-fpm
ENV PHP_REDIS_VERSION 5.3.2
Using the newer redis version i was able to successfully build and run the container.
Many thanks for your feedback!
It would be great when the env COMPOSER_VERSION
here, is changed to be an ARG
so it can be changed in build time.
Would you be open for an pull request?
To run multiple processes, I would very much like an installed supervisor.
Examples: gearman workers, laravel queue workers
Any plans to support composer 2.0? It might be nice to have images for 1.x and 2 so people can try out 2 but return to 1 if they need to. See https://blog.packagist.com/composer-2-0-is-now-available/
Hi,
Could you update your images in docker hub with the a little latest composer versions? It is quite important for symfony4 to have composer version which works proper with flex
Could the images on dockerhub be updated with a new version of composer. The issue described in composer/composer#8586 is fixed in composer 1.9.3, and will cause be problems before too long.
This is needed for wordpress (I know...)
when I install laravel with new version of prooph/composer:7.3 that support composer 2.0, I had an error like below.
In PackageManifest.php line 122:
Undefined index: name
ello, is there a reason prooph/docker-files enables the soap extension in all php images?
https://github.com/search?l=&q=soap+user%3Aprooph&type=Commits
Clearing caches.
Pulling Docker image prooph/composer:7.2
[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "/bin/sh" is not defined.
Test-Case:
php -d error_reporting=22527 -d display_errors=1 -r 'var_dump(iconv("UTF-8", "UTF-8//IGNORE", "This is the Euro symbol '\''€'\''."));'
output:
Notice: iconv(): Wrong charset, conversion from
UTF-8' to UTF-8//IGNORE' is not allowed in Command line code on line 1
So I customized the dockerfile to:
FROM prooph/php:7.1-fpm-opcache
RUN apk add gnu-libiconv --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
Let's test this:
output:
string(30) "This is the Euro symbol '€'."
Any idea why this is needed?
git clone --branch ${RABBITMQ_VERSION} https://github.com/alanxz/rabbitmq-c.git /tmp/rabbitmq \
&& cd /tmp/rabbitmq \
&& mkdir build && cd build \
&& cmake .. \
&& cmake --build . --target install \
# workaround for linking issue
&& cp -r /usr/local/lib64/* /usr/lib/ \
If PHP 7.1 is supported by Xdebug, use a stable version instead of master.
8.3 is out (has been since 23rd November 2023) and it would be nice to have relevant containers added in here. Happy to attempt the change if folks are busy.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.