- 最新
- 最多得票
- 最多評論
Have you tried using volumes as mentioned under the Volumes section of this document from docker - https://docs.docker.com/cloud/ecs-integration/
Also look at this - https://docs.aws.amazon.com/AmazonECS/latest/developerguide/efs-volumes.html
Hello there.
I would recommend having a docker volume that you can declare very easily if you use docker-compose and have a sidecar that will deal with downloading/creating configuration files for you in this/these docker volume(s). Especially if you do not need the files to be shared across different containers, which would require you to use NFS/AWS EFS.
I have written a sidecar container that can do all of this for you, which you can get from here
I have numerous examples of using it that can be found in labs (GitHub)
The "instructions" on files to download / generate files using it in the docs as well. The configuration itself can be stored in either of these. I usually like to store it base64 encoded in SSM, but if the file gets too large, you can use S3 instead.
To simplify the deployment of your service with these two, I'd recommend using ECS Compose-X which will take care of your volumes configuration, IAM permissions, and access to S3, etc.
This might be one of the simplest examples I have to demonstrate both.
Hope this helps.
相關內容
- AWS 官方已更新 10 個月前
- AWS 官方已更新 2 年前
I have tried adding my file to be copied into a folder in efs and I was able to attach it to a container.But that is not what I am looking for. I want to copy a particular file onto a specific destination inside the container(/usr/local/tomcat/webapps/root/js). Copying to efs and attaching the volume did not solve my problem.Appreciate your response. Thanks in advance!!