简体   繁体   中英

How do I set the docker volume in ecs?

I'm going to transfer what I worked on the previous EC2 to the ECS.

In traditional EC2, the -v /home/ubuntu:/data option allowed the volume to be set.

First, I added volume through "Volume add in task definition" and proceeded with mounting as before.

However, this did not produce a normal result.

So I have some concerns.

For Ubuntu, it's the /home/ubuntu path, but I'm not sure how the ECS Fargate path is configured.

Secondly, I am wondering if adding :/data at the end of the container path is the right way.

Defined Volume

Volume set to existing EC2 written in JSON

Mount Points in ECS

With Fargate you would need to use an EFS volume for this. You don't have access to host volumes with Fargate.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM