Skip to content
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

Not working on windows 11 #129

Open
mauudev opened this issue Jan 27, 2024 · 2 comments
Open

Not working on windows 11 #129

mauudev opened this issue Jan 27, 2024 · 2 comments

Comments

@mauudev
Copy link

mauudev commented Jan 27, 2024

I have installed docker desktop + compose plugin, but when I initialize the compose process it fails with an syntax error:

ps_backend   | ./scripts/wait-for-it.sh: 6: Syntax error: word unexpected (expecting "}")

I changed the entry point from /bin/bash to /bin/sh with no effect.
This is how my dockerfile looks like:

FROM python:3.11.3-bullseye

ENV DOCKER_ENV=True
ENV PYTHONPATH=/src
ENV PATH="/root/.local/bin:${PATH}"

WORKDIR /src
COPY . /src
RUN apt update -y && apt upgrade -y && apt install curl -y
RUN curl -sSL https://install.python-poetry.org | python -
RUN poetry install --no-dev
RUN chmod +x ./scripts/starter.sh
RUN chmod +x ./scripts/wait-for-it.sh
RUN chmod +x ./scripts/run-backend.sh

EXPOSE 8000

ENTRYPOINT ["/bin/sh"]

It works with no issues on debian or ubuntu distros, but why is it failing on windows?

@AntoineCRVI
Copy link

Windows does not come with bash nor any other POSIX shell interpreter. You can use Git Bash, WSL or Cygwin to run bash scripts in Windows. Make sure to save the .sh file with LF line endings for the script to work.

@atkrad
Copy link

atkrad commented Oct 30, 2024

I suggest using Wait4X because it’s cross-platform, a single binary, and doesn’t rely on any OS dependencies.
https://github.com/atkrad/wait4x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants