Comments (19)
You guys are hijacking this thread, please stop.
from wait-for-it.
To be a bit more explicit about the workaround that @iturgeon suggested,
I also fixed this issue by replacing sh /code/wait-for-it.sh ....
with bash /code/wait-for-it.sh ...
from wait-for-it.
Since this issue is open for while. Let me share a tool I have written in Go with cross platform support and which has the same purpose of this project (even the name is the same) https://github.com/maxcnunes/waitforit.
from wait-for-it.
Strange, I don't think my alpine 3.3 container complained about this line.
Update: looking at my build, I added the bash package to get by.
from wait-for-it.
I'm open to new solution. It's just that while it solves one problem (not having to install bash) it adds another (having to build or download a binary)
from wait-for-it.
@Vanuan Just a reminder. If you don't want to your Dockefile be responsible to download the binary. You could also use COPY
do add the binary from your file system.
Actually even with this tool you would end up with the same "problem": download or copy the script from the file system.
from wait-for-it.
Sorry, I never commit binaries to a git repository. With shell scripts I don't hesitate to do it.
It would be great to have it included in alpine repository.
from wait-for-it.
im also getting this with a openjdk:8-jre manifold image
from wait-for-it.
@iturgeon have you looked into this too?
from wait-for-it.
Yes, I've added this too as a workaround.
from wait-for-it.
What's great in shell script is that you just add one file to your directory and if you have bash that's it. Since your script is written in go, and go is a part of docker, it can be executed even without a shell, right?
from wait-for-it.
For UNIX systems the approach of this project is really straight forward. But it may start to be a bit complicated to maintain this approach once:
- need to add support for different OS and platforms
- need to add new features such as supporting http code checking (may would depend on third party tools such as curl)
An approach in Go solve those problems because it generates a binary. So to add support for a new OS/platform would only be required to build a binary for that target. And adding new features is simple because in most cases would require using a Go built in package or maybe another external package. But that would not be a problem for different OS/platform because of the binary.
PS: The built binary does not need Go installed in the machine to be able to run. It is a totally self contained executable.
from wait-for-it.
I meant you can build it using a Dockerfile, without the need to download anything, right?
from wait-for-it.
It would be great if it was shipped with alpine, so that it's even less code to write to start using it.
from wait-for-it.
OS support is irrelevant, since bash would be supported in windows and Docker doesn't currently support any other platform except linux (windows 2016 is still not released).
from wait-for-it.
I don't think so you have access to Go from the Dockerfile. Because the Docker running the build on the Dockerfile is already a built binary. Does not have all the Golang support to build a new binary.
OS support is relevante if you think it depend on third party tools. For instance bash itself is not available in all images by default. You would still need to install that at least. And as I said before, if it start to include new features such as the http status checking, it may start to depend on other tools as well. Which means, you have to include in your image more things than a single binary.
But if the these points I am bringing up does not concern you and the solution of this project works for you. Please than just use this one. It is a small and straight forward solution. π
from wait-for-it.
@maxcnunes please, don't be defensive, I think your project is great! I'm just sharing my thoughts
from wait-for-it.
I'm not π Just sharing some thoughts as well.
from wait-for-it.
Has anyone found a workaround for this? I just hit it in a python:3.7.2-alpine3.9
image.
from wait-for-it.
Related Issues (20)
- Use within dockerfile before running another command against now running app HOT 4
- Is it possible to wait for a specific path? HOT 3
- timeout command not on macOS HOT 8
- Update debian package HOT 1
- Add option to use nc (netcat) instead o bash /dev/tcp/ HOT 1
- Can multiple be supportedοΌ HOT 4
- Wait for it is not working with node:17-alpine HOT 3
- Can you please explain to me when I need to use this project? HOT 2
- Request to have a shell version of the script HOT 4
- Mistakenly submitted issue
- Support for IPv6 addresses HOT 3
- Script timesout (No such file or directory) while running with bash command HOT 2
- Support logging to stdout
- Bug: Wrong error message when the value for -t is not given
- Not working on windows 11
- Line 75 syntax error HOT 1
- Raw shell script URL `500`
- Enable TravisCI
- Debian tracker and policy recommendation flag
- How to wait for multiple ports to be ready? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wait-for-it.