waytrade / ib-gateway-docker

Docker image with IB Gateway and IBC
MIT License
57 stars 33 forks source link

Failed to build Docker image #3

Closed marvin-garcia closed 2 years ago

marvin-garcia commented 2 years ago
Building ib-gateway

[+] Building 41.8s (11/27)
 => [internal] load build definition from Dockerfile                                                                                                   0.1s
 => => transferring dockerfile: 2.24kB                                                                                                                 0.0s
 => [internal] load .dockerignore                                                                                                                      0.1s
 => => transferring context: 2B                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                       16.7s
 => [setup  1/17] FROM docker.io/library/ubuntu:20.04@sha256:626ffe58f6e7566e00254b638eb7e0f3b11d4da9675088f4781a50ae288f3322                          0.0s
 => [internal] load build context                                                                                                                      0.2s
 => => transferring context: 1.44kB                                                                                                                    0.2s
 => CACHED [setup  2/17] RUN apt-get update -y                                                                                                         0.0s
 => CACHED [setup  3/17] RUN apt-get install --no-install-recommends --yes   curl   ca-certificates   unzip                                            0.0s
 => CACHED [setup  4/17] WORKDIR /tmp/setup                                                                                                            0.0s
 => [setup  5/17] COPY ibgateway-1010-standalone-linux-x64.sh.sha256 .                                                                                 0.1s
 => [setup  6/17] RUN curl -sSL https://github.com/waytrade/ib-gateway-docker/releases/download/v1010/ibgateway-1010-standalone-linux-x64.sh --outpu  23.7s
 => ERROR [setup  7/17] RUN sha256sum --check ibgateway-1010-standalone-linux-x64.sh.sha256                                                            0.9s
------
 > [setup  7/17] RUN sha256sum --check ibgateway-1010-standalone-linux-x64.sh.sha256:
: FAILED open or read010-standalone-linux-x64.sh
#14 0.819 sha256sum: 'ibgateway-1010-standalone-linux-x64.sh'$'\r': No such file or directory
#14 0.819 sha256sum: WARNING: 1 listed file could not be read
------
executor failed running [/bin/sh -c sha256sum --check ibgateway-${IB_GATEWAY_VERSION}-standalone-linux-x64.sh.sha256]: exit code: 1
ERROR: Service 'ib-gateway' failed to build : Build failed
mfrener commented 2 years ago

Have you edited ibgateway-1010-standalone-linux-x64.sh.sha256?

14 0.819 sha256sum: 'ibgateway-1010-standalone-linux-x64.sh'$'\r': No such file or directory means the line on ibgateway-1010-standalone-linux-x64.sh.sha256 ends with CLRF (DOS), but should be LF (UNIX), so convert to UNIX line-end if you have edited.

If not, I'm wondering where this comes from because the 1010-standalone-linux-x64.sh.sha256 has LF for me and build works, same it does on CI.

marvin-garcia commented 2 years ago

@mfrener I did not edit the file, but faced a similar issue with CLRF in some of the bash scripts. I will do the same with the SHA256 file and let you know.

marvin-garcia commented 2 years ago

I fixed the CLRF for the checksum file and everything worked. Thanks for the tip!