2

I have dockerfile with: ENTRYPOINT ["/code/docker-entrypoint.sh"]

docker-entrypoint.sh

!/bin/sh
/code/utils/BrowserStackLocal --key xxx  --daemon  start
robot --outputdir ./logs --variable xxx:yyy --variable     ./tests/BasicTestSuite.robot
/code/utils/BrowserStackLocal --key xxx  --daemon  start

When I run image, I am getting error -

  /code/docker-entrypoint.sh: 3: /code/docker-entrypoint.sh:  /code/utils/BrowserStackLocal: Exec format error

But next command (robot --outputdir ...) successfully running.

What Am I doing wrong?

P.S I've done RUN chmod a+x /code/utils/BrowserStackLocal

4
  • 2
    What is the output of file /code/utils/BrowserStackLocal ? Commented Aug 17, 2018 at 15:14
  • 1
    @Aserre Mach-O 64-bit executable x86_64 It seems that I understand what is wrong - this file is only for MacOS, I need download this binary for Linux, yes? Commented Aug 17, 2018 at 15:21
  • 2
    Yes. you can download it from here: browserstack.com/local-testing#command-line Commented Aug 17, 2018 at 15:27
  • 1
    Docker will only understand Linux system calls (except for some very specific windows images), so you'll need to provide the correct architecture for the packages you want to add to your containers Commented Aug 17, 2018 at 15:32

1 Answer 1

1

The file you are executing BrowserStackLocal probably has a different architecture than the Docker image you are running.

Are you by any chance running the 32-bits version in a 64-bit enviornment of BrowserStackLocal? You can check with the command file: file BrowserStackLocal

The other command runs after the first one fails which is expected.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.