vw_small

Hardened fork of Vaultwarden (https://github.com/dani-garcia/vaultwarden) with fewer features.
git clone https://git.philomathiclife.com/repos/vw_small
Log | Files | Refs | README

commit acdd42935b7e71461d51ab2bb92610bfec8a6601
parent 8367d1d7152151fde49902a26a5d4a13603242c2
Author: Miro Prasil <miro@circleci.com>
Date:   Mon, 30 Sep 2019 13:54:06 +0100

Add sqlite binary into the docker images

This is done to enable backup functionality in the admin interface while
we're waiting for the libsqlite-sys 0.17 to bubble up in the upstream
dependencies. Then we can start using `VACUUM INTO`

This also extends the check for the sqlite binary to also try `sqlite3`
as this is the name of the binary in baseimage distributions we use.

Diffstat:
Mdocker/aarch64/sqlite/Dockerfile | 1+
Mdocker/amd64/postgresql/Dockerfile | 1+
Mdocker/amd64/postgresql/Dockerfile.alpine | 1+
Mdocker/amd64/sqlite/Dockerfile | 1+
Mdocker/amd64/sqlite/Dockerfile.alpine | 1+
Mdocker/armv6/sqlite/Dockerfile | 1+
Mdocker/armv7/sqlite/Dockerfile | 1+
Msrc/api/admin.rs | 6+++++-
8 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/docker/aarch64/sqlite/Dockerfile b/docker/aarch64/sqlite/Dockerfile @@ -82,6 +82,7 @@ RUN apt-get update && apt-get install -y \ openssl \ ca-certificates \ curl \ + sqlite3 \ && rm -rf /var/lib/apt/lists/* RUN mkdir /data diff --git a/docker/amd64/postgresql/Dockerfile b/docker/amd64/postgresql/Dockerfile @@ -81,6 +81,7 @@ RUN apt-get update && apt-get install -y \ openssl \ ca-certificates \ curl \ + sqlite3 \ libpq5 \ && rm -rf /var/lib/apt/lists/* diff --git a/docker/amd64/postgresql/Dockerfile.alpine b/docker/amd64/postgresql/Dockerfile.alpine @@ -64,6 +64,7 @@ RUN apk add --no-cache \ openssl \ postgresql-libs \ curl \ + sqlite \ ca-certificates RUN mkdir /data diff --git a/docker/amd64/sqlite/Dockerfile b/docker/amd64/sqlite/Dockerfile @@ -81,6 +81,7 @@ RUN apt-get update && apt-get install -y \ openssl \ ca-certificates \ curl \ + sqlite3 \ && rm -rf /var/lib/apt/lists/* RUN mkdir /data diff --git a/docker/amd64/sqlite/Dockerfile.alpine b/docker/amd64/sqlite/Dockerfile.alpine @@ -63,6 +63,7 @@ ENV SSL_CERT_DIR=/etc/ssl/certs RUN apk add --no-cache \ openssl \ curl \ + sqlite \ ca-certificates RUN mkdir /data diff --git a/docker/armv6/sqlite/Dockerfile b/docker/armv6/sqlite/Dockerfile @@ -82,6 +82,7 @@ RUN apt-get update && apt-get install -y \ openssl \ ca-certificates \ curl \ + sqlite3 \ && rm -rf /var/lib/apt/lists/* RUN mkdir /data diff --git a/docker/armv7/sqlite/Dockerfile b/docker/armv7/sqlite/Dockerfile @@ -82,6 +82,7 @@ RUN apt-get update && apt-get install -y \ openssl \ ca-certificates \ curl \ + sqlite3 \ && rm -rf /var/lib/apt/lists/* RUN mkdir /data diff --git a/src/api/admin.rs b/src/api/admin.rs @@ -37,7 +37,11 @@ pub fn routes() -> Vec<Route> { } lazy_static! { - static ref CAN_BACKUP: bool = cfg!(feature = "sqlite") && Command::new("sqlite").arg("-version").status().is_ok(); + static ref CAN_BACKUP: bool = cfg!(feature = "sqlite") && + ( + Command::new("sqlite").arg("-version").status().is_ok() || + Command::new("sqlite3").arg("-version").status().is_ok() + ); } #[get("/")]