Can`t build image. #173

Closed
opened 2025-11-07 06:26:45 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @ddziech on GitHub (Dec 31, 2018).

I got error:

   Compiling bitwarden_rs v1.0.0 (/app)
error: couldn't read build.rs: No such file or directory (os error 2)

error: aborting due to previous error

error: Could not compile `bitwarden_rs`.
warning: build failed, waiting for other jobs to finish...
error: build failed
The command '/bin/sh -c cargo build --release' returned a non-zero code: 101

When i try build a image.

docker build -t bitwarden_rs .
Originally created by @ddziech on GitHub (Dec 31, 2018). I got error: ```bash Compiling bitwarden_rs v1.0.0 (/app) error: couldn't read build.rs: No such file or directory (os error 2) error: aborting due to previous error error: Could not compile `bitwarden_rs`. warning: build failed, waiting for other jobs to finish... error: build failed The command '/bin/sh -c cargo build --release' returned a non-zero code: 101 ``` When i try build a image. ```bash docker build -t bitwarden_rs . ```
Author
Owner

@ddziech commented on GitHub (Dec 31, 2018):

Just added

COPY build.rs .

to Dockerfile and worked :)
Patch if you want:

diff --git a/Dockerfile b/Dockerfile
index 3bb96ec..db6f29e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -36,6 +36,7 @@ WORKDIR /app
 # Copies over *only* your manifests and vendored dependencies
 COPY ./Cargo.* ./
 COPY ./rust-toolchain ./rust-toolchain
+COPY build.rs .
 
 # Builds your dependencies and removes the
 # dummy project, except the target folder
@ddziech commented on GitHub (Dec 31, 2018): Just added ```dockerfile COPY build.rs . ``` to Dockerfile and worked :) Patch if you want: ```diff diff --git a/Dockerfile b/Dockerfile index 3bb96ec..db6f29e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,6 +36,7 @@ WORKDIR /app # Copies over *only* your manifests and vendored dependencies COPY ./Cargo.* ./ COPY ./rust-toolchain ./rust-toolchain +COPY build.rs . # Builds your dependencies and removes the # dummy project, except the target folder ```
Author
Owner

@dani-garcia commented on GitHub (Dec 31, 2018):

Oops, fixed now, thanks!

@dani-garcia commented on GitHub (Dec 31, 2018): Oops, fixed now, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vaultwarden#173