Skip to content

Commit 910b73f

Browse files
jyn514shabiel
authored andcommitted
Cache the Cargo index when building the dockerfile
This reduces the amount of time it takes to rebuild the project after exiting and re-entering the docker image. Signed-off-by: Sam Habiel <sam@yottadb.com>
1 parent df7a42f commit 910b73f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-ins
2121
# Using a separate rustup-init.sh file allows passing CLI arguments.
2222
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup-init.sh
2323
RUN sh rustup-init.sh -y --default-toolchain stable
24+
# Update the index at image creation, so it's cached
25+
RUN ~/.cargo/bin/cargo install empty-library || true
2426

2527
VOLUME /opt/ydbrust
2628
WORKDIR /opt/ydbrust

0 commit comments

Comments
 (0)