I'm trying to build a program with cargo in a Docker container but it fails:
# Compile KissMP
FROM --platform=arm64 ubuntu:20.04
# Install dependencies
RUN apt-get update
RUN apt-get install -y cargo
RUN apt-get install -y git
# Clone & Build KissMP
WORKDIR /build
RUN git clone -b lib https://github.com/vulcan-dev/KISS-multiplayer.git
WORKDIR /KISS-multiplayer
WORKDIR /build/KISS-multiplayer/kissmp-server/
RUN cargo build --release
#24 2.299 Updating crates.io index
#24 681.7 error: failed to get `anyhow` as a dependency of package `kissmp-bridge v0.5.0 (/build/KISS-multiplayer/kissmp-bridge)`
#24 681.7
#24 681.7 Caused by:
#24 681.7 failed to load source for dependency `anyhow`
#24 681.7
#24 681.7 Caused by:
#24 681.7 Unable to update registry `crates-io`
#24 681.7
#24 681.7 Caused by:
#24 681.7 failed to fetch `https://github.com/rust-lang/crates.io-index`
#24 681.7
#24 681.7 Caused by:
#24 681.7 network failure seems to have happened
#24 681.7 if a proxy or similar is necessary `net.git-fetch-with-cli` may help here
#24 681.7 https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
#24 681.7
#24 681.7 Caused by:
#24 681.7 SSL error: unknown error; class=Ssl (16)
Does anyone know a fix for this?
Note: I cannot use Alpine