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

Cannot run tests (/bin/sh: /tmp/download_kafka.sh: not found) #7

Open
giuliopulina opened this issue Sep 21, 2020 · 1 comment
Open

Comments

@giuliopulina
Copy link

Hi,

I'm trying to run test/docker-tests.sh but I'm not able to make it work.
I previously tried with Cygwin, now I'm trying with Ubuntu (WSL2) but I'm getting the same error.
I'm running Docker version 19.03.12 and docker-compose version 1.27.2.

Below you can find the command output log:

Step 4/18 : ENV KAFKA_VERSION="1.1.0" SCALA_VERSION="2.11" ---> Running in 3558e79c688e Removing intermediate container 3558e79c688e ---> 21de6240b89d Step 5/18 : ADD download_kafka.sh /tmp/download_kafka.sh ---> 4b6a19345770 Step 6/18 : RUN chmod a+x /tmp/download_kafka.sh && sync && /tmp/download_kafka.sh && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka ---> Running in 8bfa6c58d822 /bin/sh: /tmp/download_kafka.sh: not found ERROR: Service 'kafka' failed to build : The command '/bin/sh -c chmod a+x /tmp/download_kafka.sh && sync && /tmp/download_kafka.sh && tar xfz /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz -C /opt && rm /tmp/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz && ln -s /opt/kafka_${SCALA_VERSION}-${KAFKA_VERSION} /opt/kafka' returned a non-zero code: 127

Could you please help me solving the issue?

Thanks
Giulio

@giuliopulina
Copy link
Author

I found the solution to the issue: to make the test correctly work under Windows, it's needed to keep original CRLF setting (thus setting git config --global auto.crlf to "input"), otherwise the sh scripts won't be recognized correctly.

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

1 participant