Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
BattlefieldDuck committed Mar 13, 2024
1 parent 3956181 commit e600788
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ignore Git and GitHub files
.git
.github

# Ignore all markdown files (README.md, etc.)
*.md

# Ignore all log files
*.log

# Ignore Python cache files
__pycache__
*.pyc
*.pyo
*.pyd
.Python

# Ignore Python virtual environment files
venv
env/

# Ignore common database files
*.sql
*.sqlite
10 changes: 8 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
# Dockerfile
FROM python:3.12-slim
# Stage 1: Use python:3.12 to install dependencies
FROM python:3.12 as builder

WORKDIR /app

COPY requirements.txt requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Stage 2: Use python:3.12-alpine and copy installed dependencies from builder stage
FROM python:3.12-alpine

WORKDIR /app

COPY --from=builder /usr/local /usr/local
COPY . .

0 comments on commit e600788

Please sign in to comment.