diff options
author | Nils Domrose <[email protected]> | 2019-05-26 23:02:41 +0200 |
---|---|---|
committer | Nils Domrose <[email protected]> | 2019-05-26 23:03:05 +0200 |
commit | ff759397f6742781a722dab029d695c4bbcf794a (patch) | |
tree | 525c5ef8fd704e8fb95b423369bd5bfcc59cc564 /Dockerfile | |
parent | badd22ac3d1b6c364c7be59e64ec0c48f2b960dd (diff) | |
download | vaultwarden-ff759397f6742781a722dab029d695c4bbcf794a.tar.gz vaultwarden-ff759397f6742781a722dab029d695c4bbcf794a.zip |
initial mysql support
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -23,6 +23,9 @@ RUN ls # we need the Rust compiler and Cargo tooling FROM rust as build +# set sqlite as default for DB ARG for backward comaptibility +ARG DB=sqlite + # Using bundled SQLite, no need to install it # RUN apt-get update && apt-get install -y\ # sqlite3\ @@ -31,8 +34,8 @@ FROM rust as build # Install MySQL package RUN apt-get update && apt-get install -y \ - libmysql++-dev \ - --no-install-recommends \ + libmariadb-dev\ + --no-install-recommends\ && rm -rf /var/lib/apt/lists/* # Creates a dummy project used to grab dependencies @@ -47,7 +50,7 @@ COPY ./build.rs ./build.rs # Builds your dependencies and removes the # dummy project, except the target folder # This folder contains the compiled dependencies -RUN cargo build --release +RUN cargo build --features ${DB} --release RUN find . -not -path "./target*" -delete # Copies the complete project @@ -59,7 +62,7 @@ RUN touch src/main.rs # Builds again, this time it'll just be # your actual source files being built -RUN cargo build --release +RUN cargo build --features ${DB} --release ######################## RUNTIME IMAGE ######################## # Create a new stage with a minimal image @@ -74,6 +77,7 @@ ENV ROCKET_WORKERS=10 RUN apt-get update && apt-get install -y\ openssl\ ca-certificates\ + libmariadbclient-dev\ --no-install-recommends\ && rm -rf /var/lib/apt/lists/* |