Browse Source

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.
pull/638/head
Miro Prasil 6 years ago
parent
commit
acdd42935b
  1. 1
      docker/aarch64/sqlite/Dockerfile
  2. 1
      docker/amd64/postgresql/Dockerfile
  3. 1
      docker/amd64/postgresql/Dockerfile.alpine
  4. 1
      docker/amd64/sqlite/Dockerfile
  5. 1
      docker/amd64/sqlite/Dockerfile.alpine
  6. 1
      docker/armv6/sqlite/Dockerfile
  7. 1
      docker/armv7/sqlite/Dockerfile
  8. 6
      src/api/admin.rs

1
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

1
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/*

1
docker/amd64/postgresql/Dockerfile.alpine

@ -64,6 +64,7 @@ RUN apk add --no-cache \
openssl \
postgresql-libs \
curl \
sqlite \
ca-certificates
RUN mkdir /data

1
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

1
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

1
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

1
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

6
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("/")]

Loading…
Cancel
Save