| # Use the official Python image as a base image | |
| # FROM python:3.8-slim-buster | |
| # FROM mongo:latest | |
| FROM mongo | |
| EXPOSE 27017 | |
| # RUN apt-get update | |
| # RUN apt-get install -y gnupg curl | |
| # RUN curl -fsSL https://pgp.mongodb.com/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor | |
| # RUN echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bullseye/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list | |
| # # Install MongoDB | |
| # RUN apt-get update && apt-get install -y mongodb-org | |
| # RUN mkdir -p /data/db | |
| # RUN chown -R mongodb:mongodb /data/db | |
| # # RUN service mongodb start | |
| # RUN service mongod start | |
| RUN apt-get -y update && apt-get install -y software-properties-common \ | |
| && add-apt-repository ppa:deadsnakes/ppa && apt install -y python3.10 python3-pip | |
| RUN ls /usr/bin | |
| ENV PATH /usr/bin:/usr/local/bin:$PATH | |
| # Copy the app code to the image | |
| COPY . /app | |
| WORKDIR /app | |
| # Install the app dependencies | |
| RUN python3 -m pip install -r requirements.txt | |
| # Run the app | |
| CMD ["streamlit", "run", "app.py"] |