- Change
base_s3_urlto your something like -s3-ap-south-1.amazonaws.com, which points to your region where the bucket is situated. - Change
bucket_nameto the name of your bucket.
- Run
docker build -t mynginx_image1 .in the root of the directory. (This will create an image for the nginx). - Run
docker run --name mynginx1 -p 80:80 -d mynginx_image1, this will run the docker container in the detached mode, and you are done.
- If your s3 uploaded file was earlier directed as
https://s3-ap-south-1.amazonaws.com/demo_bucket/image1.png, now it can be proxy passed aslocalhost/image1.png. - You can change the server as per your domain.