Giter Club home page Giter Club logo

docker-files's Introduction

docker-files

These images are only for development environments

Collection of prooph docker files. Please look at the sub folders for more details or see prooph/proophessor-do app for a nginx/php-fpm example.

docker-files's People

Contributors

albertmorenodev avatar ametad avatar basz avatar codeliner avatar fabiang avatar jaymecd avatar mariusambr avatar matas-valuzis avatar prolic avatar sandrokeil avatar tomhaj avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-files's Issues

PHP8 Support

Hello and thank you for this awesome docker files. Are you planning to support PHP8 too?

Thanks in advance ❤️

Why is WORKDIR removed?

@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.

latest composer version

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

Set Access-Control-Allow-Origin header conditionally in nginx

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.

using Curl http://example.com/ on php-cli-7.0-blackfire

@prolic @sandrokeil @codeliner

  1. When i try to profile a page using Curl i always find this error.
    First it starts profiling and shows Profiling: [####------------------------------------] 1/10 and then
    Are you authorized to profile this page? No probe response, missing PHP extension or invalid signature for relaying agent.

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.

nginx delegating serving assets to 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.

Add PHP 8.3 support

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.

Question about upgrading PHP releases

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!

Blackfire probe not working with Alpine Linux

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

Frequent rebuilds of docker images using github actions

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.

Hi , Excuse me,How to set the password for rabbitMQ

  "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"
    }
  ],

Not possible to install `docker-files/php/7.4fpm` with `pdo_firebird`

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?

Add supervisord to images *-cli

To run multiple processes, I would very much like an installed supervisor.
Examples: gearman workers, laravel queue workers

Iconv problem

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 '€'."

Error invalid GeoIP City database

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

amqp extension is missing

$ 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;

./composer.json not found

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?

fix Alpine lib64 linking issue

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/ \

/app acts like a black hole

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

Upgrade to xDebug 3.0 and use default settings

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".

Issue using composer:7.2

Clearing caches.
Pulling Docker image prooph/composer:7.2

[Symfony\Component\Console\Exception\CommandNotFoundException]
Command "/bin/sh" is not defined.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.