Unable to build docker via ./dev/build-ballista-docker.sh if run the command under a proxy
CaoKha opened this issue · comments
Describe the bug
rustup update
in Dockerfile fails to download file from ' https://static.rust-lang.org/rustup/release-stable.toml'.
To Reproduce
Setup proxy
export http_proxy=<domain:port>
export https_proxy=<domain:port>
I also have to copy my own .npmrc
, put it into ./dev/docker
and use COPY command in ballista-builder.Dockerfile:
COPY dev/docker/.npmrc /root/.npmrc
RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
apt-get update && \
apt-get install -y nodejs && \
npm install -g yarn
in order for npm install -g yarn
to works inside Dockerfile,
Then run this command at the project root
./dev/build-ballista-docker.sh
Expected behavior
=> ERROR [7/9] RUN rustup update && rustup component add rustfmt && cargo install cargo-chef --version 0.1.62 0.5s
------
> [7/9] RUN rustup update && rustup component add rustfmt && cargo install cargo-chef --version 0.1.62:
0.379 info: no updatable toolchains installed
0.379 info: checking for self-update
0.450 error: could not download file from 'https://static.rust-lang.org/rustup/release-stable.toml' to '/tmp/rustup-updatecbMvBO/release-stable.toml': fai
led to make network request: error sending request for url (https://static.rust-lang.org/rustup/release-stable.toml): error trying to connect: error:1416F
086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1921: (unable to get local issuer certificate): error t
rying to connect: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1921: (unable to get local
issuer certificate): error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1921: (unable to get l
ocal issuer certificate): error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed:ssl/statem/statem_clnt.c:1921:
------
ballista-builder.Dockerfile:46
--------------------
45 | # prepare rust
46 | >>> RUN rustup update && \
47 | >>> rustup component add rustfmt && \
48 | >>> cargo install cargo-chef --version 0.1.62
49 |
--------------------
ERROR: failed to solve: process "/bin/sh -c rustup update && rustup component add rustfmt && cargo install cargo-chef --version 0.1.62" did not co
mplete successfully: exit code: 1
Additional context
Nothing