Created
July 25, 2024 11:56
-
-
Save wathika-eng/c186e99fec5e98bdc72bfd0d1559b178 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # sample dockerfile for a flask application | |
| FROM python:3.10-slim | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| WORKDIR /app | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY . . | |
| RUN useradd -m testuser | |
| USER myuser | |
| COPY .env . | |
| ENV FLASK_APP=App.py | |
| ENV FLASK_RUN_HOST=0.0.0.0 | |
| ENV FLASK_RUN_PORT=8000 | |
| CMD ["flask", "run"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment