I have Dockerfile:
FROM python:3.8
ARG CMD_ARGS=$CMD_ARGS
ENV PYTHONUNBUFFERED 1
COPY ./requirements.txt /requirements.txt
RUN pip install -r /requirements.txt
RUN mkdir /app
COPY . /app
WORKDIR /app
And Docker-compose.yml file:
version: '3'
services:
selenium:
image: selenium/standalone-chrome
ports:
- 4444:4444
restart: always
app:
build:
context: .
volumes:
- .:/app
command: sh -c "python3 my_script.py -arg1 -arg2"
depends_on:
- selenium
Is there a way not to hardcode arg1,arg2 in docker-compose.yml file and instead pass it in docker-compore up command OR using environmental variables (args containing whitespace characters) somehow?