Skip to content

Commit 7b6ad2c

Browse files
authored
Merge pull request #452 from jyn514/docker-caching
[docker] Don't rebuild when the templates change
2 parents 67176f4 + 13da9fc commit 7b6ad2c

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@ RUN cargo build --release
3939
# build. The touch on all the .rs files is needed, otherwise cargo assumes the
4040
# source code didn't change thanks to mtime weirdness.
4141
RUN rm -rf src build.rs
42-
COPY --chown=cratesfyi src src/
42+
4343
COPY --chown=cratesfyi build.rs build.rs
44-
COPY --chown=cratesfyi templates templates/
45-
RUN touch build.rs && find src -name "*.rs" -exec touch {} \; && cargo build --release
44+
RUN touch build.rs
45+
COPY --chown=cratesfyi src src/
46+
RUN find src -name "*.rs" -exec touch {} \;
47+
COPY --chown=cratesfyi templates/style.scss templates/
48+
49+
RUN cargo build --release
4650

51+
ADD templates templates/
4752
ADD css $CRATESFYI_PREFIX/public_html
4853

4954
ENV DOCS_RS_DOCKER=true

0 commit comments

Comments
 (0)