diff --git a/Dockerfile b/Dockerfile index 36936a73f901695c488974412f4ff0a76236002c..7ab5e507b1f7aa5e718dde2b7e46d00f51458fc6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,27 +2,21 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:10-alpine as vault +FROM alpine as vault ENV VAULT_VERSION "v2.6.1" -ENV URL "https://github.com/bitwarden/web.git" +ENV URL "https://github.com/dani-garcia/bw_web_builds/releases/download/$VAULT_VERSION/bw_web_$VAULT_VERSION.tar.gz" RUN apk add --update-cache --upgrade \ curl \ - git \ tar -RUN git clone -b $VAULT_VERSION --depth 1 $URL web-build +RUN mkdir /web-build WORKDIR /web-build -COPY /docker/set-vault-baseurl.patch /web-build/ -RUN git apply set-vault-baseurl.patch - -RUN npm run sub:init && npm install - -RUN npm run dist \ - && mv build /web-vault +RUN curl -L $URL | tar xz +RUN ls ########################## BUILD IMAGE ########################## # We need to use the Rust build image, because diff --git a/Dockerfile.aarch64 b/Dockerfile.aarch64 index 0c41c119b2a0f963296516924618c28f497c46cd..7cbabf6f86745f7d82391dbeb24d76b6456dfb3b 100644 --- a/Dockerfile.aarch64 +++ b/Dockerfile.aarch64 @@ -2,27 +2,21 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:10-alpine as vault +FROM alpine as vault ENV VAULT_VERSION "v2.6.1" -ENV URL "https://github.com/bitwarden/web.git" +ENV URL "https://github.com/dani-garcia/bw_web_builds/releases/download/$VAULT_VERSION/bw_web_$VAULT_VERSION.tar.gz" RUN apk add --update-cache --upgrade \ curl \ - git \ tar -RUN git clone -b $VAULT_VERSION --depth 1 $URL web-build +RUN mkdir /web-build WORKDIR /web-build -COPY /docker/set-vault-baseurl.patch /web-build/ -RUN git apply set-vault-baseurl.patch - -RUN npm run sub:init && npm install - -RUN npm run dist \ - && mv build /web-vault +RUN curl -L $URL | tar xz +RUN ls ########################## BUILD IMAGE ########################## # We need to use the Rust build image, because diff --git a/Dockerfile.alpine b/Dockerfile.alpine index 9e4e5982a9c936518774f821613abdb73f1a44c4..ee51423ce549bb6700a6de8f22485e268ee85fd0 100644 --- a/Dockerfile.alpine +++ b/Dockerfile.alpine @@ -2,27 +2,21 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:10-alpine as vault +FROM alpine as vault ENV VAULT_VERSION "v2.6.1" -ENV URL "https://github.com/bitwarden/web.git" +ENV URL "https://github.com/dani-garcia/bw_web_builds/releases/download/$VAULT_VERSION/bw_web_$VAULT_VERSION.tar.gz" RUN apk add --update-cache --upgrade \ curl \ - git \ tar -RUN git clone -b $VAULT_VERSION --depth 1 $URL web-build +RUN mkdir /web-build WORKDIR /web-build -COPY /docker/set-vault-baseurl.patch /web-build/ -RUN git apply set-vault-baseurl.patch - -RUN npm run sub:init && npm install - -RUN npm run dist \ - && mv build /web-vault +RUN curl -L $URL | tar xz +RUN ls ########################## BUILD IMAGE ########################## # Musl build image for statically compiled binary diff --git a/Dockerfile.armv7 b/Dockerfile.armv7 index 28bbe52ea37c2b0885e610cc8b0d853410b15172..0a8cb28cd33c23b003a5f8998501895a0565b158 100644 --- a/Dockerfile.armv7 +++ b/Dockerfile.armv7 @@ -2,27 +2,21 @@ # https://docs.docker.com/develop/develop-images/multistage-build/ # https://whitfin.io/speeding-up-rust-docker-builds/ ####################### VAULT BUILD IMAGE ####################### -FROM node:10-alpine as vault +FROM alpine as vault ENV VAULT_VERSION "v2.6.1" -ENV URL "https://github.com/bitwarden/web.git" +ENV URL "https://github.com/dani-garcia/bw_web_builds/releases/download/$VAULT_VERSION/bw_web_$VAULT_VERSION.tar.gz" RUN apk add --update-cache --upgrade \ curl \ - git \ tar -RUN git clone -b $VAULT_VERSION --depth 1 $URL web-build +RUN mkdir /web-build WORKDIR /web-build -COPY /docker/set-vault-baseurl.patch /web-build/ -RUN git apply set-vault-baseurl.patch - -RUN npm run sub:init && npm install - -RUN npm run dist \ - && mv build /web-vault +RUN curl -L $URL | tar xz +RUN ls ########################## BUILD IMAGE ########################## # We need to use the Rust build image, because