Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Fix docker compose wait-for-it.sh script #339

Closed
stevesap opened this issue May 27, 2020 · 4 comments · Fixed by #376
Closed

Fix docker compose wait-for-it.sh script #339

stevesap opened this issue May 27, 2020 · 4 comments · Fixed by #376
Assignees
Labels
community This item is well suited to be worked on by the community. enhancement New feature or request

Comments

@stevesap
Copy link
Contributor

stevesap commented May 27, 2020

Current status

The execution of the existing wait-for-it.sh script was reverted in #338 since it was not executing properly in windows.

Error message from docker-compose run create-bucket is:

No such file or directory

Expected Behavior

wait-for-it.sh should execute properly in linux, mac and windows environments

@stevesap stevesap added enhancement New feature or request community This item is well suited to be worked on by the community. labels May 27, 2020
@stevesap
Copy link
Contributor Author

@AlexanderBarbie would you know how to fix this perhaps?

@AlexanderBarbie
Copy link
Contributor

Well, that's why you don't develop software on Windows systems. 😄
On Windows you have to use path\to\wait-for-it instead of path/to/wait-for-it (unix), if you mount the volume. I will install a windows vm and try to fix it.

@AlexanderBarbie
Copy link
Contributor

AlexanderBarbie commented May 27, 2020

@pithumke can you please tell me which Docker version you are using and did you add the wait-for-it folder under Resources > File Sharing in the Docker settings?

And did you get the error

No such file or directory/bin/env: bash

This can be a problem with the line ending. Windows changes the line endings of downloaded files and then you can't start the bash script in a linux environment. I just checked out your commit #337 and had to change the line ending to unix line endings in my eclipse. Afterwards the error disappeared.

@pithumke
Copy link
Member

pithumke commented May 27, 2020

@AlexanderBarbie Thanks for picking this up! My versions are:

Docker version 19.03.8, build afacb8b
docker-compose version 1.25.4, build 8d51620a

I did not add the "wait-for-it" script to the Docker file sharing settings, as it is already being included as a volume mount:

volumes:
      - ./scripts/wait-for-it:/root/scripts/wait-for-it

The specific console output I got when running docker-compose run create-bucket (with the rest of the compose running in the background) was:

Starting cwa-server_objectstore_1 ... done
: No such file or directory

Upon playing around with the error and including some pwd and ls statements, I can positively say that the script exists inside the container and is being started, but still, the above error is being thrown. At this point I also suspect something along the lines of this or this, but unfortunately I currently don't have the time to look into this any further.

@stevesap stevesap self-assigned this May 29, 2020
@stevesap stevesap linked a pull request May 29, 2020 that will close this issue
christian-kirschnick pushed a commit that referenced this issue May 30, 2020
* Revert "reduce version definitions in POMs (#265)"

This reverts commit 478a586.

* always checkout wait-for-it.sh with LF eol

* re-enable entry point

* enforce LF on all sh files

* removed text attributes

* test

* test

* test

* force LF on for wait-for-it.sh on commit and checkout

re-enable entry point


enforce LF on all sh files


removed text attributes


test


test


test

* removed blank line

* added LF which seems required for git to update file EOLs

Co-authored-by: Christopher Fenner <26137398+CCFenner@users.noreply.github.com>
Co-authored-by: Steve <steve.amihai.ben.ezra@sap.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community This item is well suited to be worked on by the community. enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants