Code Monkey home page Code Monkey logo

Comments (19)

aviau avatar aviau commented on July 21, 2024 5

You guys are hijacking this thread, please stop.

from wait-for-it.

scarlac avatar scarlac commented on July 21, 2024 2

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.

maxcnunes avatar maxcnunes commented on July 21, 2024 2

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.

iturgeon avatar iturgeon commented on July 21, 2024 1

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.

Vanuan avatar Vanuan commented on July 21, 2024 1

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.

maxcnunes avatar maxcnunes commented on July 21, 2024 1

@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.

Vanuan avatar Vanuan commented on July 21, 2024 1

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.

ChadLei avatar ChadLei commented on July 21, 2024 1

im also getting this with a openjdk:8-jre manifold image

from wait-for-it.

Vanuan avatar Vanuan commented on July 21, 2024

@iturgeon have you looked into this too?

from wait-for-it.

Vanuan avatar Vanuan commented on July 21, 2024

Yes, I've added this too as a workaround.

from wait-for-it.

Vanuan avatar Vanuan commented on July 21, 2024

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.

maxcnunes avatar maxcnunes commented on July 21, 2024

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.

Vanuan avatar Vanuan commented on July 21, 2024

I meant you can build it using a Dockerfile, without the need to download anything, right?

from wait-for-it.

Vanuan avatar Vanuan commented on July 21, 2024

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.

Vanuan avatar Vanuan commented on July 21, 2024

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.

maxcnunes avatar maxcnunes commented on July 21, 2024

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.

Vanuan avatar Vanuan commented on July 21, 2024

@maxcnunes please, don't be defensive, I think your project is great! I'm just sharing my thoughts

from wait-for-it.

maxcnunes avatar maxcnunes commented on July 21, 2024

I'm not πŸ˜„ Just sharing some thoughts as well.

from wait-for-it.

dborncamp avatar dborncamp commented on July 21, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.