diff --git a/Dockerfile.auth-frontend b/Dockerfile.auth-frontend index 5247ad5..8bbe115 100644 --- a/Dockerfile.auth-frontend +++ b/Dockerfile.auth-frontend @@ -5,7 +5,10 @@ COPY asklyphe-auth-frontend asklyphe-auth-frontend COPY asklyphe-common asklyphe-common COPY lyphedb lyphedb -RUN cargo install --debug --path asklyphe-auth-frontend/ +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/asklyphe-auth-frontend/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path asklyphe-auth-frontend/ FROM debian:trixie-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl3 && rm -rf /var/lib/apt-get/lists/* diff --git a/Dockerfile.authservice b/Dockerfile.authservice index 80f8a7a..c26116e 100644 --- a/Dockerfile.authservice +++ b/Dockerfile.authservice @@ -5,8 +5,16 @@ COPY authservice authservice COPY asklyphe-common asklyphe-common COPY lyphedb lyphedb -RUN cargo install --debug --path authservice/ -RUN cargo install --debug --path authservice/migration/ + +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/authservice/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path authservice/ + +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/authservice/migration/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path authservice/migration/ FROM debian:trixie-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl3 && rm -rf /var/lib/apt-get/lists/* diff --git a/Dockerfile.bingservice b/Dockerfile.bingservice index 81e0118..9534d14 100644 --- a/Dockerfile.bingservice +++ b/Dockerfile.bingservice @@ -5,7 +5,10 @@ COPY bingservice bingservice COPY asklyphe-common asklyphe-common COPY lyphedb lyphedb -RUN cargo install --debug --path bingservice/ +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/bingservice/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path bingservice/ FROM debian:trixie-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl3 && rm -rf /var/lib/apt-get/lists/* diff --git a/Dockerfile.frontend b/Dockerfile.frontend index 61503a7..ed80b37 100644 --- a/Dockerfile.frontend +++ b/Dockerfile.frontend @@ -6,7 +6,10 @@ COPY asklyphe-common asklyphe-common COPY lyphedb lyphedb COPY unit_converter unit_converter -RUN cargo install --debug --path asklyphe-frontend/ +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/asklyphe-frontend/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path asklyphe-frontend/ FROM debian:trixie-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl3 && rm -rf /var/lib/apt-get/lists/* diff --git a/Dockerfile.googleservice b/Dockerfile.googleservice index ed1ed1d..b462f1d 100644 --- a/Dockerfile.googleservice +++ b/Dockerfile.googleservice @@ -5,7 +5,10 @@ COPY googleservice googleservice COPY asklyphe-common asklyphe-common COPY lyphedb lyphedb -RUN cargo install --debug --path googleservice/ +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/googleservice/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path googleservice/ FROM debian:trixie-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl3 && rm -rf /var/lib/apt-get/lists/* diff --git a/Dockerfile.vorebot b/Dockerfile.vorebot index c9490c3..02b29a3 100644 --- a/Dockerfile.vorebot +++ b/Dockerfile.vorebot @@ -5,7 +5,10 @@ COPY vorebot vorebot COPY asklyphe-common asklyphe-common COPY lyphedb lyphedb -RUN cargo install --debug --path vorebot/ +RUN --mount=type=cache,target=$CARGO_HOME/registry \ + --mount=type=cache,target=/usr/src/asklyphe/vorebot/target \ + --mount=type=cache,target=$CARGO_HOME/git/db \ + cargo install --debug --path vorebot/ FROM debian:trixie-slim RUN apt-get update && apt-get upgrade -y && apt-get install -y libssl3 && rm -rf /var/lib/apt-get/lists/*