cardano-foundation / cardano-graphql

GraphQL API for Cardano
Apache License 2.0
262 stars 104 forks source link

unable to Pull and Run via Docker Compose #616

Closed dorijan closed 3 years ago

dorijan commented 3 years ago

Hi to all, I want to create new node with graphql on mainnet, but failed, got error ERROR: Cannot locate specified Dockerfile: Dockerfile. Fresh ubuntu 20.04 install, ryzen 3600, 64gb ram.

Platform

Platform version:

Runtime

Runtime version:

docker version
Client:
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.8
 Git commit:        20.10.7-0ubuntu1~20.04.2
 Built:             Fri Oct  1 14:07:06 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.13.8
  Git commit:       20.10.7-0ubuntu1~20.04.2
  Built:            Fri Oct  1 03:27:17 2021
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.5.2-0ubuntu1~20.04.3
  GitCommit:        
 runc:
  Version:          1.0.0~rc95-0ubuntu1~20.04.2
  GitCommit:        
 docker-init:
  Version:          0.19.0
  GitCommit:        

Steps to reproduce the bug

git pull https://github.com/input-output-hk/cardano-graphql.git
cd cardano-graphql

export NETWORK=mainnet &&docker pull inputoutput/cardano-graphql:5.1.0-${NETWORK} &&docker pull inputoutput/cardano-graphql-hasura:5.1.0 &&docker pull cardanosolutions/cardano-node-ogmios:v4.0.0-beta.9-${NETWORK} &&RESTORE_SNAPSHOT=https://update-cardano-mainnet.iohk.io/cardano-db-sync/11/db-sync-snapshot-schema-11-block-6278640-x86_64.tgz docker-compose up -d &&docker-compose logs -f

5.1.0-mainnet: Pulling from inputoutput/cardano-graphql
Digest: sha256:d429a9f311cf04e569bc520f53d9d5efeb48f820fa593e2547fa2160acf44fcb
Status: Image is up to date for inputoutput/cardano-graphql:5.1.0-mainnet
docker.io/inputoutput/cardano-graphql:5.1.0-mainnet
5.1.0: Pulling from inputoutput/cardano-graphql-hasura
Digest: sha256:e0b8ced0af0247eab27f6e8246826df1d4f8e5b8c62f5728e52df2771af7b0fb
Status: Image is up to date for inputoutput/cardano-graphql-hasura:5.1.0
docker.io/inputoutput/cardano-graphql-hasura:5.1.0
v4.0.0-beta.9-mainnet: Pulling from cardanosolutions/cardano-node-ogmios
Digest: sha256:4601df36c36d047af569acb1d10699c5ef8cf04894c5b498a324914506871e72
Status: Image is up to date for cardanosolutions/cardano-node-ogmios:v4.0.0-beta.9-mainnet
docker.io/cardanosolutions/cardano-node-ogmios:v4.0.0-beta.9-mainnet
Building cardano-node-ogmios

ERROR: Cannot locate specified Dockerfile: Dockerfile

What is the expected behavior?

To start downloading node data

dorijan commented 3 years ago

Ok, it is definitely bug somewhere in scripts, tried in new datacentre with fresh install, still got the same error

Building cardano-node-ogmios
ERROR: Cannot locate specified Dockerfile: Dockerfile
dorijan commented 3 years ago

Even the building does not work

WARNING: Native build is an experimental feature and could change at any time
Building cardano-node-ogmios
[+] Building 0.1s (2/2) FINISHED                                                                                                                                                                                                                             
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                    0.1s
 => => transferring dockerfile: 2B                                                                                                                                                                                                                      0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                       0.0s
 => => transferring context: 2B                                                                                                                                                                                                                         0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount846780193/Dockerfile: no such file or directory
Traceback (most recent call last):
  File "/usr/bin/docker-compose", line 11, in <module>
    load_entry_point('docker-compose==1.25.0', 'console_scripts', 'docker-compose')()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 72, in main
    command()
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 128, in perform_command
    handler(command, command_options)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1107, in up
    to_attach = up(False)
  File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 1088, in up
    return self.project.up(
  File "/usr/lib/python3/dist-packages/compose/project.py", line 542, in up
    svc.ensure_image_exists(do_build=do_build, silent=silent, cli=cli)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 350, in ensure_image_exists
    self.build(cli=cli)
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1108, in build
    all_events = list(stream_output(build_output, output_stream))
  File "/usr/lib/python3/dist-packages/compose/progress_stream.py", line 25, in stream_output
    for event in utils.json_stream(output):
  File "/usr/lib/python3/dist-packages/compose/utils.py", line 61, in split_buffer
    for data in stream_as_text(stream):
  File "/usr/lib/python3/dist-packages/compose/utils.py", line 37, in stream_as_text
    for data in stream:
  File "/usr/lib/python3/dist-packages/compose/service.py", line 1816, in build
    with open(iidfile) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmppmgvhmnz'
CyberCyclone commented 3 years ago

Can you please confirm that you have followed the instructions exactly on the git home page. Specifically:

git clone \ --single-branch \ --branch 5.1.0 \ --recurse-submodules \ https://github.com/input-output-hk/cardano-graphql.git \ && cd cardano-graphql

dorijan commented 3 years ago

I think I found a quickfix: docker pull cardanosolutions/cardano-node-ogmios:latest-mainnet

edit docker-compose.yml under cardano-node-ogmios change image to image: cardanosolutions/cardano-node-ogmios:latest-${NETWORK:-mainnet}

CyberCyclone commented 3 years ago

I think I found a quickfix:

docker pull cardanosolutions/cardano-node-ogmios:latest-mainnet

edit docker-compose.yml

under cardano-node-ogmios

change image to

image: cardanosolutions/cardano-node-ogmios:latest-${NETWORK:-mainnet}

This is only necessary if you clone only the cardano-GraphQL repo.

If you follow the documentation when cloning it will recursively add the submodules.