FROM python:3 WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . RUN python3 setup.py /usr/src/app/install # CMD [ "python", "./your-daemon-or-script.py" ] CMD [ "sh" ]