From 80a02da0e422914cca7f83a23ae11d4e39c38e4a Mon Sep 17 00:00:00 2001 From: Nulo Date: Sat, 29 Jun 2024 23:15:26 -0300 Subject: [PATCH] offline --- rust/api.Dockerfile | 5 ++--- rust/scraper.Dockerfile | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/rust/api.Dockerfile b/rust/api.Dockerfile index 379d9fa..97ef740 100644 --- a/rust/api.Dockerfile +++ b/rust/api.Dockerfile @@ -3,15 +3,14 @@ WORKDIR /usr/src/app RUN apk add --no-cache libgcc FROM docker.io/rust:1 AS rs-build -RUN apt-get update && apt-get install -y libsqlite3-dev sqlite3 && rm -rf /var/lib/apt/lists/* +# RUN apt-get update && apt-get install -y libsqlite3-dev sqlite3 && rm -rf /var/lib/apt/lists/* WORKDIR /usr/src/app COPY . . -RUN sqlite3 ../sqlite.db '' RUN --mount=type=cache,sharing=locked,target=/root/.cargo/git \ --mount=type=cache,sharing=locked,target=/root/.cargo/registry \ --mount=type=cache,sharing=locked,target=/usr/src/app/target \ - cargo install --bin api --locked --path . + SQLX_OFFLINE=true cargo install --bin api --locked --path . FROM base RUN apk add --no-cache sqlite sqlite-libs tini diff --git a/rust/scraper.Dockerfile b/rust/scraper.Dockerfile index b84958e..7c4f6ae 100644 --- a/rust/scraper.Dockerfile +++ b/rust/scraper.Dockerfile @@ -3,15 +3,14 @@ WORKDIR /usr/src/app RUN apk add --no-cache libgcc FROM docker.io/rust:1 as rs-build -RUN apt-get update && apt-get install -y libsqlite3-dev sqlite3 && rm -rf /var/lib/apt/lists/* +# RUN apt-get update && apt-get install -y libsqlite3-dev sqlite3 && rm -rf /var/lib/apt/lists/* WORKDIR /usr/src/app COPY . . -RUN sqlite3 ../sqlite.db '' RUN --mount=type=cache,sharing=locked,target=/root/.cargo/git \ --mount=type=cache,sharing=locked,target=/root/.cargo/registry \ --mount=type=cache,sharing=locked,target=/usr/src/app/target \ - cargo install --bin scraper --locked --path . + SQLX_OFFLINE=true cargo install --bin scraper --locked --path . FROM base RUN apk add --no-cache sqlite sqlite-libs