Closed lijixy closed 3 years ago
Please complete the form:
Platform version:
Runtime version:
node -v
docker version
Version or Git revision: version 2.17.1 Platform: Linux / Ubuntu Platform version: node:v14.17.2 docker:20.10.2
Please complete the form:
Environment
Version or Git revision:
Platform
* [ ] Linux / Ubuntu * [ ] Linux / Other * [ ] macOS * [ ] Windows
Platform version:
Runtime
* [ ] Node.js * [ ] Docker
Runtime version:
node -v docker version
Steps to reproduce the bug
What is the expected behavior?
Version or Git revision: version 2.17.1 Platform: Linux / Ubuntu Platform version: node:v14.17.2 docker:20.10.2
What cardano-graphql Git commit did you clone from?
Did you change anything in your docker-compose.yml file?
5.0.0 and I did not change anything in docer-compose.yml file
git clone --single-branch --branch 5.0.0 --recurse-submodules https://github.com/input-output-hk/cardano-graphql.git
Did you build with this command? DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose up -d --build && docker-compose logs -f
yes
To me this sounds like your docker-compose.yml is corrupt. Try deleting the cardano-graphql
folder and starting again.
git clone \
--single-branch \
--branch 5.0.0 \
--recurse-submodules \
https://github.com/input-output-hk/cardano-graphql.git \
&& cd cardano-graphql
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose up -d --build && docker-compose logs -f
The same error
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose up -d --build && docker-compose logs -f ERROR: yaml.scanner.ScannerError: while scanning a plain scalar in "./docker-compose.yml", line 31, column 21 found unexpected ':' in "./docker-compose.yml", line 31, column 44
Could I use the branch 4.0.0?
I've built 5.0.0 on three different Ubuntu 20.04 machines. Never had the issues you're having. Based on the error though, it sounds like the file is corrupt, but if you've deleted the entire directory and re-cloned it then it sounds more like a system issue rather then a docker issue.
Just for the sake of checking, can you please screenshot the docker-compose.yml section around line 31 and post here?
That looks odd. I've just passed the docker-compose.yml from the master branch through a yamllint and that line is invalid.
My build has the same file, but it runs fine.
Can you please try removing the square brackets on line 31? I'm pretty certain they're not meant to be there.
ok I try again
ERROR: The Compose file './docker-compose.yml' is invalid because: services.cardano-node-ogmios.build.cache_from contains "cardanosolutions/ogmios:latest", which is an invalid type, it should be an array
if I removed the square brackets on line 31, It had another error
The original file is actually correct with the square brackets. I'm pretty sure it's invalid yaml, but it's technically a valid docker-compose file.
Can you please share your docker-compose version?
docker-compose -v
docker-compose version 1.17.1
That's pretty old. Can you please try updating it?
It was failed, but I can run 4.0.0, could I use it?
Just double checking you reverted the docker-compose.yml to what it was from the 5.0.0 branch, upgraded docker-compose (1.29.2 is the latest I think), and then tried again?
You can use 4.0.0 which still works fine. You'll just need to apply the below patch. And probably change cardano-node in docker-compose.yml to 1.27.0. https://github.com/input-output-hk/cardano-graphql/issues/464
[internal] load metadata for docker.io/library/debian:buster-slim:
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out:
Cannot autolaunch D-Bus without X11 $DISPLAY
ERROR: Service 'cardano-node-ogmios' failed to build : Build failed
@CyberCyclone
It's a project naming clash. It doesn't know it's the same images you want built. Normally you don't need --remove-orphans
flag, but in this case it's saying to. See how the below goes.
DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker-compose up -d --build --remove-orphans && docker-compose logs -f
ok
Thanks for helping out here @CyberCyclone. I'll reopen this issue to correct the syntax in the cache_from
value, which as you point out is invalid yaml but somehow docker-compose
accepts it :shrug:
https://docs.docker.com/compose/compose-file/compose-file-v3/#cache_from
I've just reviewed the 1.2 spec. The square brackets are an alternative syntax for a sequence, so is legal which is also confirmed by https://onlineyamltools.com/validate-yaml and https://jsonformatter.org/yaml-validator. I'm wondering if http://www.yamllint.com/ is not fully implementing the spec, or is based on an older version.
@lijixy Did you get this working without needing to revert or modify the compose file?
Very strange, yesterday afternoon, I suddenly worked, and now I have synchronized 95.7%.
docker-compose up -d --build && docker-compose logs -f ERROR: yaml.scanner.ScannerError: while scanning a plain scalar in "./docker-compose.yml", line 31, column 21 found unexpected ':' in "./docker-compose.yml", line 31, column 44 Please check http://pyyaml.org/wiki/YAMLColonInFlowContext for details.