I have created a docker-compose yml file to run a cron-job in a docker container.
The cron-job which will run inside the docker container has to run a python script and connect to mysql an redis through redis-sentinel.
Cron-job need python and required python-dependencies(mysql and redis sentinel) to be installed in the docker container to run the python script successfully.
here is my docker-compose yml file
version: '3'
services:
cron-job:
image: alpine:3.10
command: crond -f -d 8
volumes:
- /Users/anshul/cron:/etc/crontabs/root:z
restart: unless-stopped
networks:
default:
external:
name: cnet
What changes I need to do here to have python and required dependencies installed on the docker container, which will come up after running this compose file.