Skip to content

Commit

Permalink
Fixed Dockerfile.dev
Browse files Browse the repository at this point in the history
  • Loading branch information
clay53 committed Feb 16, 2025
1 parent be116d6 commit e2433a5
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions backend/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,30 @@ FROM pennlabs/django-base:b269ea1613686b1ac6370154debbb741b012de1a-3.11

LABEL maintainer="Penn Labs"

# Install dependencies
RUN apt-get update \
&& apt-get install --no-install-recommends -y wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install uv
# Download the latest installer
ADD https://astral.sh/uv/0.6.0/install.sh /uv-installer.sh

RUN echo "5464b06094b6363861b99cd60a010892e52fc2a7503b7594419828e74afecfe6 /uv-installer.sh" | sha256sum -c

# Run the installer then remove it
RUN sh /uv-installer.sh && rm /uv-installer.sh

# Ensure the installed binary is on the `PATH`
ENV PATH="/root/.local/bin/:$PATH"

# Copy project dependencies
COPY Pipfile* /app/
COPY pyproject.toml /app/
COPY uv.lock /app/

# Install project dependencies
RUN pipenv install --system
RUN cd /app/ && uv sync

# Copy project files
COPY . /app/
Expand All @@ -15,4 +34,4 @@ ENV DJANGO_SETTINGS_MODULE Platform.settings.staging
ENV SECRET_KEY 'temporary key just to build the docker image'

# Collect static files
RUN python3 /app/manage.py collectstatic --noinput
RUN uv run /app/manage.py collectstatic --noinput

0 comments on commit e2433a5

Please sign in to comment.