# set base image (host OS) FROM python:3.9 WORKDIR / COPY service/__init__.py /service/ COPY service/requirements.txt /service/ COPY service/simple.py /service/ COPY test/test_simple.py /test/ # install dependencies RUN pip install -r /service/requirements.txt # Run the tests as the final check RUN export PYTHONPATH=$PYTHONPATH:./;pytest -v /test/test_*.py -r A # command to run on container start CMD [ "python", "/service/simple.py" ]