0

I try to run this command but i always get the message

/bin/sh -c git clone https://github.com/lordLegal/Test-repo.git; pip3 install urllib3 ; python3 -u /Test-repo/while.py

I also tryed the same thing with && instead of the ; in the command but i got the same message

So my Question is how can I fix it?

btw I try this on a docker container from alpine

  • 2
    `I try to run this command` There is no `docker` even in that command. Maybe try adding `docker` in front of it first? What __exactly__ do you run in your terminal? – KamilCuk Mar 19 '21 at 15:32
  • 1
    I suppose you should wrap commands after the `-c` with quotes – NobbyNobbs Mar 19 '21 at 15:48
  • Yes thank you @NobbyNobbs for the Help it worked – Martin Beneder Mar 19 '21 at 16:12
  • 1
    (Of those three commands, you should run `git clone` directly on your host; `RUN pip install` in the Dockerfile; and set the image's `CMD ./while.py` also in the Dockerfile. They do three different things and wouldn't usually go in the same line.) – David Maze Mar 19 '21 at 16:37

1 Answers1

0

You should put arguments between ", so your command should look like this:

/bin/sh -c "git clone https://github.com/lordLegal/Test-repo.git; pip3 install urllib3 ; python3 -u /Test-repo/while.py"
Saeed
  • 3,255
  • 4
  • 17
  • 36