1
0
Fork 0
mirror of https://github.com/dani-garcia/vaultwarden.git synced 2025-05-16 16:43:57 +00:00

Update dockerfile for alpine, armv7 and aarch64

This commit is contained in:
Miroslav Prasil 2018-11-20 14:55:19 +00:00
parent 8b3e87cfe0
commit bf1c96695b
3 changed files with 8 additions and 47 deletions

View file

@ -26,28 +26,17 @@ RUN npm run dist \
########################## BUILD IMAGE ##########################
# Musl build image for statically compiled binary
FROM clux/muslrust:nightly-2018-08-24 as build
FROM clux/muslrust:nightly-2018-10-03 as build
# Creates a dummy project used to grab dependencies
RUN USER=root cargo init --bin
ENV USER "root"
# Copies over *only* your manifests and vendored dependencies
COPY ./Cargo.* ./
COPY ./libs ./libs
COPY ./rust-toolchain ./rust-toolchain
# Builds your dependencies and removes the
# dummy project, except the target folder
# This folder contains the compiled dependencies
RUN cargo build --release
RUN find . -not -path "./target*" -delete
WORKDIR /app
# Copies the complete project
# To avoid copying unneeded files, use .dockerignore
COPY . .
# Builds again, this time it'll just be
# your actual source files being built
# Build
RUN cargo build --release
######################## RUNTIME IMAGE ########################