Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FPM tags #210

Open
frankvanhest opened this issue Nov 21, 2022 · 14 comments
Open

FPM tags #210

frankvanhest opened this issue Nov 21, 2022 · 14 comments

Comments

@frankvanhest
Copy link

Hi @WyriHaximus,

In the documentation fpm is mentioned, but in the tags I can't seem to find a tag for fpm on docker hub.
Hopefully, you can help me further.

Cheers,

Frank

@WyriHaximus
Copy link
Member

Hey @frankvanhest I'll update the docs to remove that, this repo isn't building FPM images. But it is probably a leftover from when I based this repo on https://github.com/usabilla/php-docker-template

@frankvanhest
Copy link
Author

Thanks for your quick response! I'll try to install it manually in the container. I love the builds you provide, fpm was the only thing missing.

@WyriHaximus
Copy link
Member

The main goal of these images are for running ReactPHP from the CLI, what are you looking for in them for FPM?

@frankvanhest
Copy link
Author

I know they are build for ReactPHP and that is something you don't really use in FPM. I don't intend to use it in FPM. Your images are complete with all the most common PHP extensions, composer included, Xdebug included, and so on. I was hoping that FPM was included, so I can use one Docker hub for everything PHP related in my projects. Thats the main reason for me

@frankvanhest frankvanhest reopened this Nov 22, 2022
@WyriHaximus
Copy link
Member

Let's get started that I'm not opposed to adding FPM images. Might have rejected it in the past but IMHO it could serve for micro ReactPHP apps during FPM requests as well.

Would you be interested in picking this task up? There is some work that would needs to be done from Docker files to tests to dealing with odd exceptions.

@frankvanhest
Copy link
Author

Yeah sure, I can give it a try! It can give me a better understanding on how to build docker images and ReactPHP.
I can get started on it this Friday night.

@WyriHaximus
Copy link
Member

Awesome! Just ping me when you have questions or run into any thing

@frankvanhest
Copy link
Author

frankvanhest commented Nov 25, 2022

@WyriHaximus, well I'm a bit stuck with adding FPM. I created the Docker files for Alpine an Debian. Running the makefile gives some error due to missing environment variables such as GITHUB_OUTPUT used in https://github.com/WyriHaximus/github-action-supported-php-versions/blob/master/versions.php

Do you have the time to help get underway?

This is what I have so far https://github.com/frankvanhest/docker-php/tree/add_fpm.
When running build-php.sh fpm fpm 8.1 8.1 alpine alpine3.16 alpine3.16 alpine3.11 arm64 it stops at:

 => [build-uv 1/3] RUN git clone https://github.com/amphp/ext-uv uv                                                                                                                                                 2.2s
 => [build-uv 2/3] WORKDIR /uv                                                                                                                                                                                      0.0s
 => ERROR [build-uv 3/3] RUN git fetch     && git pull     && phpize     && ./configure     && make install     && EXTENSION_DIR=`php-config --extension-dir 2>/dev/null`     && cp "$EXTENSION_DIR/uv.so" /uv.so   0.2s
------
 > [build-uv 3/3] RUN git fetch     && git pull     && phpize     && ./configure     && make install     && EXTENSION_DIR=`php-config --extension-dir 2>/dev/null`     && cp "$EXTENSION_DIR/uv.so" /uv.so     && sha256sum /uv.so:
#14 0.149 fatal: not a git repository (or any of the parent directories): .git
------
executor failed running [/bin/sh -c git fetch     && git pull     && phpize     && ./configure     && make install     && EXTENSION_DIR=`php-config --extension-dir 2>/dev/null`     && cp "$EXTENSION_DIR/uv.so" /uv.so     && sha256sum /uv.so]: exit code: 128

I don't see why the error fatal: not a git repository (or any of the parent directories): .git is given. Perhaps you can shed a light on it.

@WyriHaximus
Copy link
Member

@frankvanhest Haven't ran into that one before. Will have a look tomorrow morning at you branch and see if I have the same issue

@WyriHaximus
Copy link
Member

@frankvanhest Looks like / isn't the default path you enter the container in for FPM. So change line 25 to:

RUN git clone https://github.com/amphp/ext-uv uv

@frankvanhest
Copy link
Author

@WyriHaximus Thanks for your help! The work directory was indeed incorrect. I The line you mentioned was already correct. After I changed line 26 to

WORKDIR uv

I could successfully build the image.

Screenshot 2022-11-26 at 14 19 03

Is there a way to run the make build command locally? It looks like depends on GitHub actions and their environment.
Where does the file docker-image/image.tags gets created? By looking a the code, I cannot seem to find it.

@WyriHaximus
Copy link
Member

So everything is currently in a state of transition to a better solution for both local and GHA building. And while most of it is working on GHA, the same scripts can be used for the Makefile, but it needs some work. Will have a look at it after dinner.

Planning a few steps a head here, but can you file a PR like this one #209 but for RC7? This way once you file the PR for the FPM tags you don't need to wait for my approval to run the workflow :)

@frankvanhest
Copy link
Author

frankvanhest commented Nov 28, 2022

Thanks! I've created one for RC7 #211. Tomorrow evening I'll continue working on this.
Apparently first timers need approval ;)

Screenshot 2022-11-28 at 19 49 02

@WyriHaximus
Copy link
Member

I think you PR'ed the wrong changes ;). They introduced that when cryptocurrency fanatics where filing PR's to run miners in GHA 🤐 . And it marks you as cool after the first merged PR 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants