I have a python script that on a loop
- Downloads video chunks from AWS S3 to /filename.
- Sorts files in order and concatenates them.
- Uploads entire processed video file to AWS S3.
- Deletes folder /filename.
Then continues on a loop until the AWS SQS queue is empty.
Script works great! I have run it for months. The hard drive space varies but never gets about 5%, depending on size of the video.
I decided to put this script in a docker container and run docker-compose so I could run a bunch of them at a time.
The problem is the hard drive fills up! I know with 5 running the space on the disk will be higher, but when I'm done processing, the file gets deleted.
But with docker, it seems to be a cache or something. I exec into each container and they are running fine. Deleteing old files and all.
No clue what the difference between, in a docker container and running as a service would have as impact on the HD.
To add to this, when I "rm" the docker containers, the hard drive space frees up. I run a "docker ps -s" and the space on the containers is not crazy. Just seems like when you "rm" a file inside the docker container it never really "rm"s it.