storefront-api icon indicating copy to clipboard operation
storefront-api copied to clipboard

sfa_app_1 exited with code 127

Open ghost opened this issue 5 years ago • 22 comments

Hey guys on windows docker-compose up yields sfa_app_1 exited with code 127 and app_1 | /usr/local/bin/docker-entrypoint.sh: exec: line 8: /usr/local/bin/storefront-api.sh: not found

to make it work I had to add RUN chmod 777 /usr/local/bin/storefront-api.sh in Dockerfile

ghost avatar Feb 11 '20 11:02 ghost

Hey, on which branch are you? Then I can look into it.

ResuBaka avatar Feb 11 '20 11:02 ResuBaka

master branch

ghost avatar Feb 11 '20 12:02 ghost

@ResuBaka any updates on this one?

pkarw avatar Feb 27 '20 07:02 pkarw

Hey, I got the exact same issue, app_1 | /usr/local/bin/docker-entrypoint.sh: exec: line 8: storefront-api.sh: not found sfa_app_1 exited with code 127

I tried to add "RUN chmod 777 /usr/local/bin/" to the storefront-api/dockerfile - with no luck.

Christian-Rau avatar Apr 17 '20 08:04 Christian-Rau

RUN chmod 777 /usr/local/bin/storefront-api.sh

Can you share your Dockerfile? I don't see Dockerfile in my project...

ngocnamdev avatar Jun 10 '20 17:06 ngocnamdev

You can also, chmod the file in your project, it will take those permissions with it, like so

chmod +x docker/storefront-api/storefront-api.sh

Then do the build again by removing the container, then doing docker-compose up Hope this helps

WinstonN avatar Jun 11 '20 07:06 WinstonN

i got the same error can anyone please help @ResuBaka

vemulaharshith avatar Jul 24 '20 15:07 vemulaharshith

Hey guys on windows docker-compose up yields sfa_app_1 exited with code 127 and app_1 | /usr/local/bin/docker-entrypoint.sh: exec: line 8: /usr/local/bin/storefront-api.sh: not found

to make it work I had to add RUN chmod 777 /usr/local/bin/storefront-api.sh in Dockerfile

how did u solved can u help me

vemulaharshith avatar Jul 25 '20 08:07 vemulaharshith

Thanks a lot i will try

On Thu, 6 Aug 2020 at 11:36 AM, vyyytenis [email protected] wrote:

in docker .env set PHP_FPM_INSTALL_WKHTMLTOPDF=true, WORKSPACE_INSTALL_WKHTMLTOPDF=true. Then docker rebuild. Then php artisan vendor:publish --provider="Barryvdh\Snappy\ServiceProvider"

In snappy.php set: 'pdf' => [ 'enabled' => true, 'binary' => 'wkhtmltopdf', 'timeout' => false, 'options' => [], 'env' => [], ],

'image' => [ 'enabled' => true, 'binary' => 'wkhtmltoimage', 'timeout' => false, 'options' => [], 'env' => [], ],

https://github.com/barryvdh/laravel-snappy

This worked for me

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/DivanteLtd/storefront-api/issues/40#issuecomment-669722072, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHH33ZSNADO7ZHIAWYMTFTLR7JB7DANCNFSM4KS7HRNQ .

vemulaharshith avatar Aug 06 '20 06:08 vemulaharshith

Thanks a lot i will try On Thu, 6 Aug 2020 at 11:36 AM, vyyytenis @.***> wrote: in docker .env set PHP_FPM_INSTALL_WKHTMLTOPDF=true, WORKSPACE_INSTALL_WKHTMLTOPDF=true. Then docker rebuild. Then php artisan vendor:publish --provider="Barryvdh\Snappy\ServiceProvider" In snappy.php set: 'pdf' => [ 'enabled' => true, 'binary' => 'wkhtmltopdf', 'timeout' => false, 'options' => [], 'env' => [], ], 'image' => [ 'enabled' => true, 'binary' => 'wkhtmltoimage', 'timeout' => false, 'options' => [], 'env' => [], ], https://github.com/barryvdh/laravel-snappy This worked for me — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#40 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHH33ZSNADO7ZHIAWYMTFTLR7JB7DANCNFSM4KS7HRNQ .

Sorry, this is not for storefront-api. I got confused in my opened tabs. But the thing is you need to search for storefront in docker file. Sorry again for misleading

vyyytenis avatar Aug 06 '20 08:08 vyyytenis

I have the same problem, as a workaround I changed the last CMD with CMD ["yarn", "start"] and added COPY tsconfig.build.json ./

I know that's not a solution but in the meantime it works :)

rodsouto avatar Aug 11 '20 17:08 rodsouto

For anyone still having this issue in Windows, I found that it was due to the Windows-style line endings used in the Dockerfile.

All I had to do was change vue-storefront-api\docker\vue-storefront-api\Dockerfile to use LF line endings. It's probably also worth doing the same to vue-storefront-api\docker\vue-storefront-api\vue-storefront-api.sh, just in case.

Apologin avatar Aug 19 '20 00:08 Apologin

Для тех, кто все еще имеет эту проблему в Windows, я обнаружил, что это связано с окончаниями строк в стиле Windows, используемыми в Dockerfile.

Все, что мне нужно было сделать, это изменить vue-storefront-api \ docker \ vue-storefront-api \ Dockerfile, чтобы использовать окончания строк LF. Вероятно, на всякий случай стоит сделать то же самое с vue-storefront-api \ docker \ vue-storefront-api \ vue-storefront-api.sh.

This is didn't help for me. Did you any other actions? What is your environment?

Vincently92 avatar Aug 24 '20 13:08 Vincently92

Tried all of the solutions above, tried @Apologin @rodsouto and @neticon-polovina solution, but still the container is falling with 127 code

cafesk8 avatar Oct 16 '20 23:10 cafesk8

Hi, I had a .sh file that wouldn't run with a similar error. I changed the line ending of the file from CRLF to LF, now it looks like things are working. It's probably because I'm on Windows. I made the change from CRLF to LF on the .sh file using Visual Studio Code in the bottom right of the window.

I found the solution from this link: https://github.com/payid-org/payid/issues/539#issuecomment-651116587

I just thought I would share, maybe it helps someone here.

DolanP avatar Nov 08 '20 09:11 DolanP

HELP NEEDED - Exited 127 PORT: 8080

@ResuBaka @filrak Hello, I am on Windows 10 PRO and receive the errors below when running the Docker command : docker-compose -f docker-compose.yml -f docker-compose.nodejs.yml up -d

I have tried all suggestions above with accuracy and have had not luck.

vuesfdocker1 vuedocker2

B-Griffinn avatar Nov 11 '20 23:11 B-Griffinn

@B-Griffinn Change the last line in Dockerfile from CMD ["vue-storefront-api.sh"] to CMD ["yarn", "start"] thanks @rodsouto

jai247 avatar Jan 06 '21 11:01 jai247

@jai247 That doesn't seem to be working for me.

image image

soloham avatar Jan 06 '21 21:01 soloham

Have the same problem. Any solution yet?

dvdmchl avatar Jan 29 '21 11:01 dvdmchl

has anyone tried something else and worked? I'm struggling here, none of the above solutions work.

[sfa_app 8/9] COPY storefront-api.sh /usr/local/bin/:


failed to solve: rpc error: code = Unknown desc = failed to compute cache key: "/storefront-api.sh" not found: not found

goldenkat213 avatar Feb 24 '22 02:02 goldenkat213

@goldenkat213 nope,

My output is as follows: image

All 4 docker instances start, but the Vue-Storefront-Api_app_1 either starts and shuts down, or crashes with the 127 error.

I even tried the docker-edit from this person: https://github.com/vuestorefront/vue-storefront-api/issues/438

Still no luck...

casdep avatar Mar 03 '22 15:03 casdep

Update:

This API is used in combination with VSF1. VSF2, however, is the default front-end for now. No need to fix this if you are using VSF2.

casdep avatar Mar 05 '22 15:03 casdep