Closed nbali closed 2 years ago
HI @nbali,
This message is raised by docker client not code itself. Usually it relates to mismatch between docker image and docker host architecture. Currently we are providing only amd64
type of image.
You can use uname -a
to get the architecture of the infrastructure used by GitHub actions. This would help us define what type of docker image should be used.
@nbali I found the problem.
exec "$RUNTIME" run "$USE_TTY" \
--rm \
-u "$(id -u):$(id -g)" \
When we run gcpdiag script in the GH runner environment "$USE_TTY"
variable is empty but quoted so final exec commend is invalid:
exec docker run '' --rm -u 1001:121 -e USER=runner -e GROUP=docker -e SHELL=/bin/bash ...
But when I run same script locally or in the Cloud Shell exec comment quotas are removed by shell:
exec docker run --rm -u 1001:121 -e USER=runner -e GROUP=docker -e SHELL=/bin/bash ...
As a workaround you can execute this combo to move forward and final script will be fixed in the script code:
curl https://gcpdiag.dev/gcpdiag.sh > gcpdiag
sed -i 's/run "\$USE_TTY"/run \$USE_TTY/' gcpdiag
bash -x ./gcpdiag lint --project=dummy-non-existing-project
I tried to use it with Github Actions - minimalistic setup to reproduce (I know configs like credentials are missing, but it's not required for the reproduction):
Output:
I think "docker: invalid reference format." isn't an intended error message.