FROM python:3 RUN useradd -ms /bin/bash user RUN mkdir /data && chown user /data USER user ADD --chown=user requirements.txt /app/requirements.txt WORKDIR /app RUN pip3 install -r requirements.txt ADD --chown=user . /app RUN chmod +x /app/commander.py VOLUME /data ENTRYPOINT [ "/app/main.py"] CMD ["-s", "/data/"]