Docker: wget for https does not work

In my docker file I have below command

RUN wget -o test.jar

But in build I get below error:

  • Restart ecs-agent from user-data
  • Jenkins - Pipeline (Amazon EC2 Container Service Plugin)
  • Install MySQL connector/J in Docker container
  • Docker: Nginx + PHP-FPM and multiple sites
  • Docker - how to run mongodb process as daemon
  • is it a good practice to put a war file image into docker containers?
  • The command '/bin/sh -c wget -o test.jar' returned a non-zero code: 8

    I tried --no-check-certificate and -U but got same error.

  • How do I create docker image from an existing CentOS?
  • In Docker-compose, don't see the host names of other services
  • How to reboot kubernetes pod and keep the data
  • Docker + GNU Screen lags
  • Docker on Cloud hosting
  • SonarQube server can not be reached by Jenkins using Docker
  • 2 Solutions collect form web for “Docker: wget for https does not work”

    Below command works. I should have used ADD

    ADD .

    The manual of wget says that -o specifies where log messages are written to. This mean the option -o test.jar causes that error messages are written to test.jar instead of stderr. You will not see any error messages on stderr and you will not download the file to test.jar.

    The following command works on my pc and if any error occurs, you should see a message now:

    wget -O test.jar
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.