I am trying to create container with following docker file. Since it is going to execute last CMD, it ignores CMD ["sh", "-c", "python3 run_scheduler.py --config=${config}"].
Is there a way to run both from single docker file. Also, is it possible to pass ${config} argument to flask api in CMD ["gunicorn", "--bind", "0.0.0.0:5000", "run_api:application", "&"]
FROM python:3.8
LABEL version="0.1"
WORKDIR /app
COPY . /app
ARG config=dev
RUN pip install -r requirements.txt
EXPOSE 5000
CMD ["sh", "-c", "python3 run_scheduler.py --config=${config}"]
CMD ["gunicorn", "--bind", "0.0.0.0:5000", "run_api:application", "&"]
docker run; as a Docker Composecommand:). Run two separate containers with two separate commands.