I want to migrate my php site from a virtual machine to a docker container. My site persists all uploaded files to the uploads directory. Now I would like to transfer all the files to S3 Storage and save further uploads also to Amazon S3. But I don't want to rewrite the php file uploader class. Is it possible to create in Docker the symlink folder, or virtual folder, so that all writes and reads on uploads/** path are 'redirected' to S3 Storage.
Docker supports S3 Storage Driver but I am new to docker, and don't know how the folder should be mapped to the s3 storage in dockerfile. No other examples I have found.
Thank you for your help.
Update: Please see the Taruns answer. If you also know, that AWS Storage Gateway on hosting environment, is the only one good solution, please upvote or share your thoughts.