I have an EC2
instance. It has a python
snippet to put some data on the s3
bucket. I have attached the S3
full admin role to this EC2
machine and it works fine. Great.
And then I wanted to run the same python
script inside Docker
So I installed docker
and executed the python
script.
And now I get the error message saying it doesn't have access to S3
resources.
So the problem is, docker
network and EC2
/Host network are different, right?!?
So I googled and found this:
--net host
But how can I set this command and make the docker-in-docker looks like it is in the same network as it's host?
Where should I supposed to put this --net host
part?