S
S
Sergey Sokolov2017-06-05 10:09:58
Docker
Sergey Sokolov, 2017-06-05 10:09:58

What is the best way to perform a periodic task in docker?

Docker old 1.7.1, Redis containers, MySQL, working (php cli + add-ons). The worker waits for the next video rendering task from Redis and executes it.
For monitoring, you need to take the queue length (LLEN in Redis) once every 5 minutes and write it to the log in the database. Run a short script in a split second. In the same environment as the worker.
What is the best way to do it? Tried:

  1. Each time to create a new container from the same image as the working one - it takes a noticeably long time
  2. Do not delete the container, but restart it - it worked for a couple of days and stopped, with a pipe2 error
  3. docker exec in the worker container. For some reason, it stopped running during rendering.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question