FROM python:3.10.12 RUN useradd -m -u 1000 user WORKDIR /app COPY ./packages.txt /app/packages.txt RUN apt-get update && xargs -r -a packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* # create user #USER user #ENV HOME=/home/user \ # PATH=/home/user/.local/bin:$PATH # setting workdir # WORKDIR $HOME/app COPY --chown=user ./requirements.txt requirements.txt #COPY --chown=user ./packages.txt packages.txt RUN pip3 install --no-cache-dir -r requirements.txt #RUN apt-get update && xargs -r -a packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/* COPY --chown=user . /app EXPOSE 8501 CMD streamlit run app.py \ --server.headless true \ --server.enableCORS false \ --server.enableXsrfProtection false \ --server.fileWatcherType none