fix docker
This commit is contained in:
parent
b231733dfb
commit
ce7461dc67
|
@ -18,21 +18,21 @@ RUN apt-get update && apt-get install -y \
|
|||
# Install UV for faster Python package management
|
||||
RUN pip install uv
|
||||
|
||||
# Create non-root user early
|
||||
RUN useradd --create-home --shell /bin/bash app && \
|
||||
chown -R app:app /app
|
||||
|
||||
# Switch to app user
|
||||
USER app
|
||||
|
||||
# Copy pyproject.toml and uv.lock
|
||||
COPY --chown=app:app pyproject.toml uv.lock ./
|
||||
COPY pyproject.toml uv.lock ./
|
||||
|
||||
# Install Python dependencies as app user
|
||||
# Install Python dependencies
|
||||
RUN uv sync --frozen --no-dev
|
||||
|
||||
# Copy application code
|
||||
COPY --chown=app:app . .
|
||||
COPY . .
|
||||
|
||||
# Create non-root user and fix permissions
|
||||
RUN useradd --create-home --shell /bin/bash app && \
|
||||
chown -R app:app /app && \
|
||||
chmod -R 755 /app
|
||||
|
||||
USER app
|
||||
|
||||
# Expose port
|
||||
EXPOSE 8000
|
||||
|
|
Loading…
Reference in New Issue