title: Docker delete file on stop of container
body: <p>i have a django app that also uses cerlery and celery also creates a .pid file but if i restart my app with docker-compose up celery fails to start because the old .pid file within the container does not get deleted,
  what can i do to solve this isse?
  Is there maybe a way on linux-side (debian 9) to remove the file at restart or shutdown of the container?</p>
  
  <p>snippet of my docker config:</p>
  
  <pre><code>celery:
      image: echo_echo
      command: bash -c "celery worker -A echo -l INFO --pidfile="/tmp/celery/celery.pid" "
      volumes:
        - echo:/echo
  ...
  </code></pre>
  
  <p>Thanks and br</p>