saeed349/Microservices-Based-Algorithmic-Trading-System

Docker compose wget: command not found

Opened this issue ยท 5 comments

When running docker compose it gives me this error.

PS C:\wsl\Microservices-Based-Algorithmic-Trading-System> docker-compose up -d --build
WARNING: The MAPBOX_API_KEY variable is not set. Defaulting to a blank string.
Building minio-image
Step 1/2 : FROM minio/minio
---> 88a529ae9ab6
Step 2/2 : RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc
---> Running in 6ab6c6f42d7e
/bin/sh: wget: command not found
ERROR: Service 'minio-image' failed to build : The command '/bin/sh -c wget https://dl.min.io/client/mc/release/linux-amd64/mc && chmod +x mc' returned a non-zero code: 127

I also tried removing that line, which made the compose successful, however when running starter_script.bat I get the error bellow.

C:\wsl\Microservices-Based-Algorithmic-Trading-System>docker exec -it jupyter-image /bin/sh -c "python /home/jovyan/work/q_pack/db_pack/schema/secmaster_db_symbol_loader.py"
Traceback (most recent call last):
File "/home/jovyan/work/q_pack/db_pack/schema/secmaster_db_symbol_loader.py", line 131, in
main()
File "/home/jovyan/work/q_pack/db_pack/schema/secmaster_db_symbol_loader.py", line 118, in main
symbols = parse_wiki_forex()
File "/home/jovyan/work/q_pack/db_pack/schema/secmaster_db_symbol_loader.py", line 38, in parse_wiki_forex
rv = client.request(r)
File "/opt/conda/lib/python3.8/site-packages/oandapyV20/oandapyV20.py", line 305, in request
response = self.__request(method, url,
File "/opt/conda/lib/python3.8/site-packages/oandapyV20/oandapyV20.py", line 242, in __request
raise V20Error(response.status_code,
oandapyV20.exceptions.V20Error: {"errorMessage":"Insufficient authorization to perform request."}

Solved this by installing older version of minio

FROM minio/minio:RELEASE.2020-04-10T03-34-42Z

RUN wget https://dl.min.io/client/mc/release/linux-amd64/mc && \
    chmod +x mc

you can also solve this by adding RUN microdnf update && microdnf -y install wget in the dockerfile to add wget back in and then you can use the latest version of minio

the other option is to remove the RUN line and install the mc client with the following: docker run -itd --privileged=true --net=
host minio/mc

the reason it breaks is because minio changed the base image they use

RUN curl -s -o mc https://dl.min.io/client/mc/release/linux-amd64/mc && \
    chmod +x mc 

that worked for me.

RUN microdnf update && microdnf -y install wget

this is the solution and should be added to the Repo :)

In the Dockerfile I changed RUN into CMD and works fine