-
-
Notifications
You must be signed in to change notification settings - Fork 271
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
not a git repository when building single binary app #680
Comments
was using this instead, but dunno if this one is recommended
|
i am having the same problem. |
Do you have Also, can you share the build output? What isn't a git repository? |
i have deleted my .git folder. |
If you deleted the git folder and receive an error about missing a git folder... what is the bug? |
I don't think it is referring to the git folder in my project. I tried with the git folder, including it in my .dockerignore file and got the same error again. |
Small investigation show, that this happens here https://github.com/dunglas/frankenphp/blob/main/build-static.sh#L35-L53. Obvious, here is no git repo
But you can run |
It worked, thank you so much |
@Aldoo24 How do you resolve the issue? |
This is my dockerfile @HuyNguyen206 FROM --platform=linux/amd64 dunglas/frankenphp:static-builder-1.1.2 # Copy your app WORKDIR /go/src/app/dist/app COPY . . # Build the static binary, be sure to select only the PHP extensions you want WORKDIR /go/src/app/ RUN ./dist/frankenphp-linux-x86_64 version \ export FRANKENPHP_VERSION=1.1.2 \ EMBED=dist/app/ \ ./build-static.sh |
Thank you @Aldoo24 , it worked |
EDIT: I did miss that it was running I tried with Aldoo's dockerfile but I get the following issue now:
Is this a tyop in |
Run |
hi @Aldoo24 , after generating the binary successfully, when I try to run: |
|
I tried run and start also but problem remains still same. No content on localhost. Is there any fix? |
@skmirajbn this doesn't look related to the original issue. Can you please open a new issue (if none already exists for this problem) and provide us with a reproducer? Closing as there is no issue here, this works as documented: https://frankenphp.dev/docs/embed/ |
@dunglas Example Dockerfile at https://frankenphp.dev/docs/embed/#creating-a-linux-binary suggests that you don't need I think one option is to export |
@dejanceltra the Docker image contains a copy of FrankenPHP source in its default directory. If you change the default directory using |
If it is the case, So don't we need to update the documentation according to this? |
This problem still exists. Currently after following this instruction we got this git error.. I don't know why the issue is closed. |
With the exception of allowed files, all others are ignored for Docker context, including |
What would be the official instruction to solve this problem? I followed the documentation and if it is not working as expected, shouldn't the documentation need to be updated? |
I'll try to take a look today. The |
The problem is if anyone just follow This page to create standalone binary it not work. He will just get an error. In the below screenshot, I modified the Dockerfile: I tried this. On this file, I didn't get any error during building process but after the build when I tried to run the app using ./filename run or ./filename start or ./filename php-server It shows in the terminal looks like the server is running but in the browser nothing is coming. Tring to figure out the problem in the last 4 - 5 days. Still unsuccessful. |
@skmirajbn That's a separate issue, not related to the missing |
@skmirajbn you must use the |
@skmirajbn also I don't find the difference between the Dockerfile in your screenshot and the one in the docs. |
|
If I just remove this line ./dist/frankenphp-linux-x86_64 version \ The git error reappears. I don't know why Here is the screenshot In original documentation the added line doesn't exist. |
Ok thank you very much @dejanceltra I think I get the problem! |
What happened?
encounter not a git repository error when using docker static builder
Dockerfile is based on https://frankenphp.dev/docs/embed/
Build Type
Docker (Debian Bookworm)
Worker Mode
Yes
Operating System
GNU/Linux
CPU Architecture
Apple Silicon
PHP configuration
Relevant log output
No response
The text was updated successfully, but these errors were encountered: