I am building a actix-web Rust application that uses the async-stripe crate dependency. When I run cargo build --release locally, the application compiles successfully and I am able to run the executable. However, when I try to build the application using Docker, I receive the following error:
I have followed the steps in the async-stripe documentation for adding the dependency to my application and installing the necessary dependencies, but the issue only occurs when building the application using Docker.
To Reproduce
Create a new actix-web Rust application and add the async-stripe dependency to the Cargo.toml file
Create a Dockerfile for the application. Here is my dockerfile
FROM rust:1.65 as build
WORKDIR /usr/src/app
COPY . .
RUN cargo build --release
FROM gcr.io/distroless/cc-debian10
COPY --from=build /usr/src/staj/target/release/app /usr/local/bin/app
WORKDIR /usr/local/bin
CMD ["app"]
Build the application using docker build .
Expected behavior
The application should build successfully
Code snippets
No response
OS
macOS
Rust version
1.67.0
Library version
async-stripe 0.15.1
API version
2020-08-27
Additional context
I've also tried using alpine in a multi-stage build. I've also tried using runtime-async-surf and runtime-tokio-hyper. Running a cargo build --release locally on my Mac works fine. Will try to run this cargo build on a linux system to verify if the problem is the OS rather than docker itself.
Describe the bug
I am building a actix-web Rust application that uses the async-stripe crate dependency. When I run
cargo build --release
locally, the application compiles successfully and I am able to run the executable. However, when I try to build the application using Docker, I receive the following error:I have followed the steps in the async-stripe documentation for adding the dependency to my application and installing the necessary dependencies, but the issue only occurs when building the application using Docker.
To Reproduce
Expected behavior
The application should build successfully
Code snippets
No response
OS
macOS
Rust version
1.67.0
Library version
async-stripe 0.15.1
API version
2020-08-27
Additional context
I've also tried using alpine in a multi-stage build. I've also tried using runtime-async-surf and runtime-tokio-hyper. Running a cargo build --release locally on my Mac works fine. Will try to run this cargo build on a linux system to verify if the problem is the OS rather than docker itself.