FROM python:3.8 as base WORKDIR /app ADD . ./app RUN pip install -r requirements.txt FROM base as builder RUN pip install pyinstaller RUN pyinstaller -F -c demo.py FROM base as runner COPY --from=builder . /app/ CMD [ "python", "main.py" ]