Win 10 Pro Docker install - payid missing file error 127
solonmedia opened this issue ยท 12 comments
Expected Behavior
Install Docker for Windows
From PowerShell adm run devEnvUp
Install and run both payid and payid-database
Both machines run
Actual Behavior
At step 4, payid does not start and yields the following erro:
/usr/local/bin/docker-entrypoint.sh: exec: line 8: /opt/payid/scripts/wait-for-postgres.sh: not found
Environment
- Node version: 12.18.1
- NPM version: 6.14.5
- Operating System and version: Windows 10 Pro v 2004
- PayID server version: 1.0.0
- PayID Version header (if applicable):
@solonmedia Thanks for addressing this.
What directory are you running these steps from?
Hey @solonmedia, someone on our team did a fresh Windows 10 pro v 2004 Bootcamp partition, installed Docker and Node.js 12, and PayID ran successfully after npm run devEnvUp
.
Can you give us more guidance to reproduce the issue?
@dino-rodriguez I've cloned the git in payid in a windows user subfolder
N:\Users\suppo\Dockers\payid\
I am running the npm run commands inside that payid folder.
npm run devEnvUp
Starting payIid-database ... done
Recreating payid ... done
And in the docker setup for payid, postgres is running fine - it's the payid container that will not start.
Port 8080 is clear. Just seems strange that the composer ran without errors and postgres is running - it's just the payid that errors out with the missing file complaint.
I can try cloning the repo on a non-system drive, but I'm in an admin account.
In the log screen for the payid container, the only payid messages are:
payid | /usr/local/bin/docker-entrypoint.sh: exec: line 8: /opt/payid/scripts/wait-for-postgres.sh: not found
payid | /usr/local/bin/docker-entrypoint.sh: exec: line 8: /opt/payid/scripts/wait-for-postgres.sh: not found
Hi @solonmedia , thank you for your response.
After cloning the PayID repository, are you modifying any file or executing any command other than npm run devEnvUp
?
Before running npm run devEnvUp
can you confirm the scripts
directory is there with wait-for-postgres.sh
in it?
Can you show us the content of .dockerignore
in the root payid directory, please?
When the payid
container is created, does it keep running or does it stop?
If you can include some screenshots that would be helpful, thank you.
@FlorentSG No mods at all. I just fetched the last master and so it actually added a few network pieces and I hoped it would work, but the behavior of the payid portion does not change.
fetch master
.dockerignore looks okay:
# In .dockerignore
# Exclude everything, the image build will be faster.
#
*
# Now un-exclude the required files/directory to run PayID
#
!@types
!package.json
!package-lock.json
!scripts
!src
!test
!tsconfig.eslint.json
!tsconfig.json
run the build
Try starting payid
Environment for payid
Postgres has always installed and ran fine
If any other files would be helpful, please let me know.
Hi @solonmedia thank you for your detailed response.
Could you please confirm wait-for-postgres.sh
is in the scripts
directory?
When was the last time you built the payid:1.0.0 image?
Make sure your payid local master branch is up to date and execute:
npm run devDown
docker rmi payid:1.0.0
npm run devEnvUp
Please let me know the results after running the 3 commands above.
If the issue still happens, I am happy to have a conference call to help you fix this issue faster if you agree, as I am not able to reproduce it on my Windows 10 machine. I am in the GMT+8 timezone.
Thank you
Hi
Hi @solonmedia thank you for your detailed response.
Could you please confirm
wait-for-postgres.sh
is in thescripts
directory?
When was the last time you built the payid:1.0.0 image?Make sure your payid local master branch is up to date and execute:
1. `npm run devDown` 2. `docker rmi payid:1.0.0` 3. `npm run devEnvUp`
Please let me know the results after running the 3 commands above.
If the issue still happens, I am happy to have a conference call to help you fix this issue faster if you agree, as I am not able to reproduce it on my Windows 10 machine. I am in the GMT+8 timezone.
Thank you
Hello. I have the same issue. I tried running the commands you suggested but the result is the same.
Hi @solonmedia @TheErevuCode , could you please run:
docker version
docker-compose version
Let us know the result of these two commands.
Can you also check that you have the most up to date Docker version? If not, please update it and re-run the 3 commands I mentioned in my previous comment.
In the taskbar, click on the Docker icon and then Check for Updates
Thank you
docker version:
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:23:10 2020
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:29:16 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
docker-compose version:
docker-compose version 1.25.5, build 8a1c60f6
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.1c 28 May 2019
After running the three commands stated earlier:
docker rmi payid:1.0.0:
Untagged: payid:1.0.0
Deleted: sha256:e0f24c36a08e46a18afd39be43ef7c01dc4b83eb630618611f8c6d3f95d8c5a7
Deleted: sha256:09c611303c56aee6e7ee74974cc59229b71b3f2c04b2e2d1ec7c6ac7522f8205
Deleted: sha256:99d21f9f277dec5e163bc1f2311222c6c0f2c14411cb830f16d3e0428f590085
Deleted: sha256:0678567761b7235299dec94a2a071bb5bae02c6e76f61b871dd4db7ca7f69338
Deleted: sha256:e3599d7a3f6e7faadbfa46067f2dab4259212d49640e8f5ef6cedebe0b12a73b
Deleted: sha256:94f9063bdd844b3a5eb0aa7ed3360f7f0508d711a386656d21d108f683d9567c
Deleted: sha256:bf2e61acd403aa3a50b51582ee7d55061065979f8e2aff3bf0a93e32af61bbf6
Deleted: sha256:50757e867abddbe085b145c4bad4cab56aa22f21cf7d14366598c6757622cb8d
Deleted: sha256:7ee5475b05912f04eddde23e551116f4181da68867cf7bf931aff08b08f10371
Deleted: sha256:92cee9c4ddf64d95fb7c09567dc9235869205477a3a3d1b4f32b69d2d708ca70
Deleted: sha256:02f19cff70fc60bf3ed61fbc9027ada57cfcec9fa3295085f5f010c8c65a1071
Deleted: sha256:a36caf6208306da195c9ed71d737e9aec39639ed9b9efd8b95cbfd2ec60eb8fd
Deleted: sha256:f35bd6dbdeb734082e25cca120e6b7dc20a2e7f9db5f4b300dd7b9f86b88ee00
Deleted: sha256:4b17384814d5e89e8ca499ceef06a2b90fb48bae21d286dedab21ca2db9f7303
Finally, I just did a fetch and pulled the latest master, which seems to install a number of new dependencies but other than that - the final build has the same issues as before. I can confirm the 11 stage process completes successfully.
The contents of the scripts directory:
06/20/2020 08:51 AM <DIR> .
06/20/2020 08:51 AM <DIR> ..
06/20/2020 08:51 AM 1,499 wait-for-postgres.sh
The contents of wait-for-postgres.sh seem accurate.
I am going to try rebuilding outside the system drive and see if something is interfering with the copy process to the docker - of course nothing should, but I am unsure why this is working for others and not for me. Trying to reduce the variables. I am running all of these commands in an elevated cmd.
I tried doing a fresh repo clone on a storage drive, the same payid failure - file cannot be found, though it is clearly present in the scripts directory.
Hi @solonmedia , @TheErevuCode , good news, I finally managed to reproduce your issue. This is an issue with wait-for-postgres.sh
line ending on Windows. This is not a Docker issue.
When you're cloning the repo, I suspect git (or another tool you may use) to change the line endings from LF
(Unix) to CR LF
(Windows).
This is creating the error message once you launch the payid container.
I used Notepad++ to change back the ending from CR LF
to LF
.
So here are the steps:
- Open
wait-for-postgres.sh
with Notepad++ (or another software allowing you to change the line endings) and change the line endings toUnix (LF)
- Run
npm run devDown
(optional if you haven't any containers running) - Remove the payid image with
docker rmi payid:1.0.0
- Run again
npm run devEnvUp
You should then have PayID running successfully.
@hbergren , @austin-king , @dino-rodriguez fyi
Yes!
I can confirm that changing the EOL from windows to Unix corrected the problem and I have all greens. I will disable EOL conversion for this repo in git as indicated here:
https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings
EDIT: Actually it looks like this should really be set in a .gitattributes file in the root of the repo.