Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files3 unmodified lines4567892 unmodified lines1213141516171819202122232425262728293031323334353 unmodified lines# Create non-root userRUN useradd -m -u 1000 userRUN apt-get update && apt-get install -y git# Set environment variablesENV HOME=/home/user \PATH=/home/user/.local/bin:$PATH \2 unmodified lines# Create and set working directoryWORKDIR $HOME/app# Copy requirements first to leverage Docker cache#COPY --chown=user requirements.txt .RUN git clone https://github.com/charan200415/FileToLink temp && mv temp/* temp/.* ./ && rmdir temp# Switch to non-root userUSER user# Install dependenciesRUN pip install --user -r requirements.txt# Copy application files#COPY --chown=user . .# Create uploads directory#RUN mkdir -p uploads# Expose portEXPOSE ${PORT}# Command to run the applicationCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]3 unmodified lines456789102 unmodified lines13141516171819202122232425262728293031323 unmodified lines# Create non-root userRUN useradd -m -u 1000 userRUN apt-get update && apt-get install -y git# Set environment variablesENV HOME=/home/user \PATH=/home/user/.local/bin:$PATH \2 unmodified lines# Create and set working directoryWORKDIR $HOME/app# Clone the repository and move files without creating an extra folderRUN git clone https://github.com/charan200415/FileToLink temp && \shopt -s dotglob && \mv temp/* ./ && \rmdir temp# Switch to non-root userUSER user# Install dependenciesRUN pip install --user -r requirements.txt# Expose portEXPOSE ${PORT}# Command to run the applicationCMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]
Dockerfile+8-11