Closed bgbahoue closed 6 years ago
Are you sure "forever" actually means forever? The first time you build cargo has to clone the index which can take a bit if you're on slow internet. If you run the container interactively and build manually you can see a progress bar.
You're right it "just" took a super long time (>2h)
Is there a way to accelerate this? How can I get that progress bar you are mentioning?
You could have a base image that's downloaded a copy of the index potentially. You can see the progress bar if you run cargo build
manually inside of docker run -it --rm ... rust:1.29.0 bash
Are you sure "forever" actually means forever? The first time you build cargo has to clone the index which can take a bit if you're on slow internet. If you run the container interactively and build manually you can see a progress bar.
i think from docker build point of view, every time is the first time, it will always be slow. right?
I am trying to build a Docker image using Rust official image but it hangs forever on the
cargo install
command while it works fine when I runcargo install
from a terminal.I have seen a few old issues on this but none of the solutions that were listed then are working.
Anything I can do to solve this?
Output from
docker install -t <myapp> .
command