-
Notifications
You must be signed in to change notification settings - Fork 849
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
Firebase deploy fails #224
Comments
It would seem the entrypoint as defined in the Dockerfile (firebase.bash) uses Windows-style carriage returns (CRLF), not Linux style (LF) so errors with "/bin/sh^M: bad interpreter: No such file or directory" when run. Changing to Linux style returns fixes the issue. |
Just in case anyone is wondering where to find this |
Could somebody post the updated code? |
My code looks like this. It fixed my issue. RUN apt-get update ENTRYPOINT [ "/usr/bin/firebase.bash" ] |
i am confused as to what the answer is, one of you is saying the solution is in the firebase.bash with the windows style carriage returns, but the code from collins-lagat says its from the dockerfile. I have tried to figure out where the issue lies but I cant figure it out RUN npm i -g firebase-tools ENTRYPOINT [ "/usr/bin/firebase.bash" ] and the firebase.bash #!/bin/bash |
What error are you getting? |
the same described originally above, "standard_init_linux.go:190: exec user process caused "no such file or directory" |
Yeah, If you are using Windows, the way Windows saves a .bash file is different in unix like OSs like Linux and Mac. And since most Dockerfiles have a Linux base, a .bash file saved in Windows will cause an error. However, a utility app called dos2unix exists to counter this. This app converts a windows .bash file to a unix .bash file. It reverses what Windows did. # Install dos2unix
RUN apt-get install dos2unix
# Convert the file
RUN dos2unix /usr/bin/firebase.bash |
Appreciate the help, have a nice day! |
Affected builder image
gcr.io/cloud-builders-community/helm
Expected Behavior
Actual Behavior
Pulling image: gcr.io/$PROJECT_ID/firebase
Using default tag: latest
latest: Pulling from $PROJECT_ID/firebase
e79bb959ec00: Already exists
d4b7902036fe: Already exists
1b2a72d4e030: Already exists
d54db43011fd: Already exists
69d473365bb3: Already exists
6e2490ee2dc8: Already exists
a379571b1bfc: Already exists
7b9a41966503: Already exists
f4b1c42f5c2b: Pulling fs layer
17b0c2359212: Pulling fs layer
715c6ee9925e: Pulling fs layer
17b0c2359212: Verifying Checksum
17b0c2359212: Download complete
715c6ee9925e: Verifying Checksum
715c6ee9925e: Download complete
f4b1c42f5c2b: Verifying Checksum
f4b1c42f5c2b: Download complete
f4b1c42f5c2b: Pull complete
17b0c2359212: Pull complete
715c6ee9925e: Pull complete
Digest: sha256:6445a29e9a3a5095e0ce7f01246d99a64d7942c911ef350ea7a7ee4906319617
Status: Downloaded newer image for gcr.io/$PROJECT_ID/firebase:latest
standard_init_linux.go:190: exec user process caused "no such file or directory"
Steps to Reproduce the Problem
Additional Info
I have replaced the name of my actual project above with $PROJECT_ID.
Running firebase deploy from my laptop works.
Cloudbuild.yaml below
steps:
Install
args: ['install']
Build
args: ['run', 'build', '--prod']
Deploy
args: ['deploy']
The text was updated successfully, but these errors were encountered: