2021年3月25日星期四

Run a shell script inside a docker container

I have a shell script like create.sh inside a docker container. I connected to container like below.

docker exec -it --user=root <container_id> /bin/sh  

and when i try to run the script inside the container i am getting an error .

sh-4.2# sh create.sh  create.sh: line 1: !/bin/bash: No such file or directory  

Any ideas?

https://stackoverflow.com/questions/66800029/run-a-shell-script-inside-a-docker-container March 25, 2021 at 08:59PM

没有评论:

发表评论