I'm new to fargate and even dockers. But I have used dockers for a couple of months. Only now, I am using fargate.
I create a particular docker instance as follows:
docker run -v localHostFolder/configFile:dockerFolder/configFile -v my-vol:/app --restart always --entrypoint "myEntryScript.sh" myDockerImage
This works well on dockers. What I do here is use a config file from my machine "localHostFolder/configFile" and load it onto the docker instance I create. I want the docker instance to be populated with some config values.
In addition, I use my-vol:/app to save state data from my docker container so if the container restarts, this data can be used.
Now, a few questions -
I understand Fargate gives u access to just the container and not the underlying host. If so, how do you accomplish the above?
When I try to create a fargate container, I see an option for volumes, but not sure how it works. In fact I see that the mount-volumes drop down is always empty and don't see an option to create one either. Is this something only an admin can do?
Can we do the above using Fargate at all and if so how? If not using volumes, is there an alternate way to do this?
I also noticed there's something called Service discovery that I think can be used to create a fixed dns record so other aws containers can use the dns host name instead of the IP. Is this possible with Fargate? I see it is doable with ECS, but not tried though.