Skip to content

Commit

Permalink
Install pipenv via APT package rather than pip / venv
Browse files Browse the repository at this point in the history
  • Loading branch information
mureytasroc committed Nov 5, 2023
1 parent 51a1f73 commit af249ae
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,8 @@ WORKDIR /app/

# Install dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y python3.11-dev python3-distutils libpq-dev gcc python3.11-venv \
&& python3.11 -m venv /opt/venv

# Activate virtual environment
ENV PATH="/opt/venv/bin:$PATH"

# Install pipenv using pip
RUN pip install --upgrade pip \
&& pip install pipenv

# Clean up
RUN apt-get clean \
&& apt-get install --no-install-recommends -y python3.11-dev pipenv python3-distutils libpq-dev gcc \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Copy config files
Expand All @@ -33,7 +23,7 @@ COPY docker/supervisord.conf /etc/supervisor/
COPY Pipfile* /app/

# Install project dependencies
RUN pipenv install --system
RUN pipenv install --deploy --system

# Copy project files
COPY . /app/
Expand Down

0 comments on commit af249ae

Please sign in to comment.