Rearrange Dockerfile to make caching better
This commit is contained in:
parent
b8382853e0
commit
674d37a753
1 changed files with 5 additions and 3 deletions
|
@ -4,21 +4,23 @@ FROM ghcr.io/astral-sh/uv:debian as builder
|
|||
RUN apt-get update && apt-get install -y pngcrush imagemagick
|
||||
|
||||
# Install Sass
|
||||
ENV SASS_VERSION=1.86.0
|
||||
RUN mkdir -p /opt
|
||||
ADD "https://github.com/sass/dart-sass/releases/download/1.83.0/dart-sass-1.83.0-linux-x64.tar.gz" /opt/
|
||||
RUN bash -c '(cd /opt && tar xzvf /opt/dart-sass-1.83.0-linux-x64.tar.gz)'
|
||||
ADD "https://github.com/sass/dart-sass/releases/download/$SASS_VERSION/dart-sass-$SASS_VERSION-linux-x64.tar.gz" /opt/
|
||||
RUN bash -c '(cd /opt && tar xzvf /opt/dart-sass-$SASS_VERSION-linux-x64.tar.gz)'
|
||||
ENV PATH=$PATH:/opt/dart-sass/
|
||||
|
||||
## Let's build! :D
|
||||
WORKDIR /usr/src
|
||||
|
||||
COPY .python-version uv.lock pyproject.toml ./
|
||||
RUN uv sync
|
||||
|
||||
COPY generator/ generator/
|
||||
COPY site/ site/
|
||||
COPY scripts/ scripts/
|
||||
COPY .git/ .git/
|
||||
|
||||
RUN uv sync
|
||||
RUN bash ./scripts/build-prod.sh
|
||||
|
||||
# ===================================================================
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue