cardano-foundation / cardano-graphql

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

docker compose build failed #702

Closed ghost closed 2 years ago

ghost commented 2 years ago

Environment

The CLI can be used to gather generic information about your system to assist with support. No installation is required thanks to npx

npx @cardano-graphql/cli system-info
{
  os: {
    arch: 'x64',
    cpus: {
      count: 4,
      model: 'Intel(R) Xeon(R) Platinum 8259CL CPU @ 2.50GHz'
    },
    release: '5.11.0-1022-aws',
    totalMem: 16586838016,
    type: 'Linux'
  },
  version: '6.2.0'
}

Alternatively, what release or Git revision are you using:

Platform

Platform version:

Runtime

Runtime version:

node -v
docker version

ubuntu@ip-172-31-35-74:~/cardano-graphql$ node -v v17.8.0 ubuntu@ip-172-31-35-74:~/cardano-graphql$ docker version Client: Docker Engine - Community Version: 20.10.14 API version: 1.41 Go version: go1.16.15 Git commit: a224086 Built: Thu Mar 24 01:48:02 2022 OS/Arch: linux/amd64 Context: default Experimental: true

Server: Docker Engine - Community Engine: Version: 20.10.14 API version: 1.41 (minimum version 1.12) Go version: go1.16.15 Git commit: 87a90dc Built: Thu Mar 24 01:45:53 2022 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.5.11 GitCommit: 3df54a852345ae127d1fa3092b95168e4a88e2f8 runc: Version: 1.0.3 GitCommit: v1.0.3-0-gf46b6ba docker-init: Version: 0.19.0 GitCommit: de40ad0 ubuntu@ip-172-31-35-74:~/cardano-graphql$

Steps to reproduce the bug

   git clone https://github.com/input-output-hk/cardano-graphql.git
    cd cardano-graphql/
    git checkout remotes/origin/6-2-stable
    DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 NETWORK=testnet RESTORE_SNAPSHOT=https://updates-cardano-testnet.s3.amazonaws.com/cardano-db-sync/12/db-sync-snapshot-schema-12-block-3429999-x86_64.tgz API_PORT=3101 HASURA_PORT=8091 OGMIOS_PORT=1338 POSTGRES_PORT=5433 METADATA_SERVER_URI="https://metadata.cardano-testnet.iohkdev.io" docker-compose -p testnet up -d --build &&docker-compose -p testnet logs -f

build failed. logs:

WARNING: Native build is an experimental feature and could change at any time
Building cardano-node-ogmios
[+] Building 0.0s (1/2)                                                                                                                                                                        
 => [internal] load build definition from Dockerfile                                                                                                                                      0.0s
 => => transferring dockerfile: 2B                                                                                                                                                        0.0s 
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount225272328/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/tmpcr0v_eqw'

What is the expected behavior?

Cardano graphql build normally.

rhyslbw commented 2 years ago

Looks like you're missing the submodules. Please follow the instructions here: https://github.com/input-output-hk/cardano-graphql#getting-started