Reputation: 2443
I am using the amazonlinux image to test a server setup script without spending time and money on real EC2 instances. However, I cannot get the script to execute within the container.
I am running with the following command: `docker run -v script.sh:/tmp/script.sh -w /tmp amazonlinux ./script.sh
Which fails with "Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"./script.sh\": permission denied": unknown.
-rwxrwxrwx
on the host.drwxr-xr-x
.root
.Upvotes: 2
Views: 1180
Reputation: 5930
Try this:
docker run -v ${PWD}/script.sh:/home/root/script.sh -w /home/root amazonlinux ./script.sh
Upvotes: 1