Skip to content

Commit

Permalink
Optimize Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
LeaveMyYard committed May 23, 2023
1 parent 4ef44cc commit e2202ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ __pycache__
.gitignore
Dockerfile
*.md
*.txt
.vscode

# Exclude logs and cache
Expand Down
16 changes: 3 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,12 @@ WORKDIR /app

# Install system dependencies required for Poetry
RUN apt-get update && \
apt-get install --no-install-recommends -y curl && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
dpkg --add-architecture arm64

# Install Poetry
RUN curl -sSL https://install.python-poetry.org | python -

# Add Poetry to the PATH
ENV PATH="/root/.local/bin:${PATH}"

# Copy the pyproject.toml files
COPY pyproject.toml ./
COPY ./requirements.txt requirements.txt

# Install the project dependencies
RUN poetry config virtualenvs.create false \
&& poetry install --no-dev --no-interaction --no-ansi --no-root
RUN pip install -r requirements.txt

# Copy the rest of the application code
COPY . .
Expand Down

0 comments on commit e2202ea

Please sign in to comment.