2

According to https://stackoverflow.com/a/39302427/12276541, this should show the progress bar:

RUN curl --progress-bar -sSL -o flutter_sdk.tar.xz ${FLUTTER_SDK_URL} 

but it does not work on docker.

How to show curl progress bar on docker?

Rafaelo
  • 33
  • 1
  • 15
  • "RUN" is required when writing in a Docker File. Is this question on the terminal inside Docker Container? Are you talking about DockerFile? – hashito Jun 14 '21 at 03:32
  • @hashito yes, on a Dockerfile – Rafaelo Jun 14 '21 at 03:35
  • would have been nice if you could get curl to just print a progress line every 10sec. Same problem in k8s container doing download, no progress. – Pieter Jul 29 '22 at 02:23

1 Answers1

-1

The DockerFile should contain the code needed to build the image environment.

In other words, if you use Curl with DockerFile, you don't need to display the progress bar, only when you need to load some data.

If the person being asked is a command that works when creating a container from an image and executing it, it should be rewritten as follows.

CMD ["curl", "--progress-bar", "-sSL", "-o flutter_sdk.tar.xz", "${FLUTTER_SDK_URL}"] 

CURL must be installed to do this

--add---
You can work around this issue by changing to wget.

run wget ${FLUTTER_SDK_URL} 
hashito
  • 94
  • 6