Runner failed on docker/login-action@v2 #301

Closed
opened 2023-07-21 20:28:34 +00:00 by kamaslau · 6 comments

Environments

  • gitea/gitea:latest-rootless (1.20.0, sha256:4e7f26dd7b82ee6c66d094ffdebb86517035196f806a96bdff4402046cc7d60e)
  • gitea/act_runner:latest (0.2.3, sha256:0f278648efabb2e378d7124764cd235e2addcd6bd465ec2c5469f1a242d5e491)

Both are running as docker container on x86_64 debian machine.

runner started with:

docker run --name gitea-runner \
-d \
--restart always \
  -e GITEA_INSTANCE_URL=https://your_gitea.com \
  -e GITEA_RUNNER_REGISTRATION_TOKEN=your_token \
  -v /var/run/docker.sock:/var/run/docker.sock \
  gitea/act_runner

main.yaml step

      # https://github.com/marketplace/actions/docker-login
      - name: Log in to the Container registry
        uses: docker/login-action@v2
        with:
          registry: ${{ env.REGISTRY }}
          username: ${{ gitea.actor }}
          password: ${{ secrets.GITEA_TOKEN }}

Step echo

Logging into <my-gitea-registry>...
::error::Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
# Environments - gitea/gitea:latest-rootless (1.20.0, sha256:4e7f26dd7b82ee6c66d094ffdebb86517035196f806a96bdff4402046cc7d60e) - gitea/act_runner:latest (0.2.3, sha256:0f278648efabb2e378d7124764cd235e2addcd6bd465ec2c5469f1a242d5e491) Both are running as docker container on x86_64 debian machine. # runner started with: ```bash docker run --name gitea-runner \ -d \ --restart always \ -e GITEA_INSTANCE_URL=https://your_gitea.com \ -e GITEA_RUNNER_REGISTRATION_TOKEN=your_token \ -v /var/run/docker.sock:/var/run/docker.sock \ gitea/act_runner ``` # main.yaml step ```bash # https://github.com/marketplace/actions/docker-login - name: Log in to the Container registry uses: docker/login-action@v2 with: registry: ${{ env.REGISTRY }} username: ${{ gitea.actor }} password: ${{ secrets.GITEA_TOKEN }} ``` # Step echo ```bash Logging into <my-gitea-registry>... ::error::Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. ```
Contributor

Have you run https://github.com/docker/setup-buildx-action?

Have you run `https://github.com/docker/setup-buildx-action`?
Author

That's not part of my workflow step so far.
In Github Actions,my workflow works fine though. Is it required in Gitea Actions to walk through docker/setup-buildx-action before using any docker/* actions?
I'm a newbee to Gitea, any help is appreciated.

That's not part of my workflow step so far. In Github Actions,my workflow works fine though. Is it required in Gitea Actions to walk through docker/setup-buildx-action before using any docker/* actions? I'm a newbee to Gitea, any help is appreciated.
Author

@harryzcy docker/setup-buildx-action has failed as well.

main.yaml step:

# https://github.com/marketplace/actions/docker-setup-buildx
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v2

now outputs:

::group::Docker info
Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
::endgroup::
::group::Download buildx from GitHub Releases
Use 0.11.2 version spec cache key for v0.11.2

I think there's something wrong within gitea/act_runner, but golang is beyond me.

@harryzcy `docker/setup-buildx-action` has failed as well. main.yaml step: ```yaml # https://github.com/marketplace/actions/docker-setup-buildx - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 ``` now outputs: ```bash ::group::Docker info Unable to locate executable file: docker. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable. ::endgroup:: ::group::Download buildx from GitHub Releases Use 0.11.2 version spec cache key for v0.11.2 ``` I think there's something wrong within gitea/act_runner, but golang is beyond me.

@kamaslau If you are using ubuntu-latest default label there is no docker runtime provided in the base image. You have to add the following step before you login to your container registry like so:

      - name: Install docker
        uses: papodaca/install-docker-action@main

The above Github action will simply apply steps to your base image doing the docker installation.

HTH,
Nek

@kamaslau If you are using `ubuntu-latest` default label there is no `docker` runtime provided in the base image. You have to add the following step **before** you login to your container registry like so: ```yaml - name: Install docker uses: papodaca/install-docker-action@main ``` The above Github action will simply apply steps to your base image doing the `docker` installation. HTH, Nek
Author

@nekrondev I'll try implement this action in my main.yaml, many thanks for the hint.

Since this was not neccessary in Github Actions, I think it might be a good idea to mention in https://docs.gitea.com/usage/actions/comparison#known-issues, because obviously I'm not the only one got stuck on the same situation. Seen also #63 (comment)

@nekrondev I'll try implement this action in my main.yaml, many thanks for the hint. Since this was not neccessary in Github Actions, I think it might be a good idea to mention in https://docs.gitea.com/usage/actions/comparison#known-issues, because obviously I'm not the only one got stuck on the same situation. Seen also https://gitea.com/gitea/act_runner/issues/63#issuecomment-733696
Author

Issue is successfully solved with #301 (comment) , closing dialog.

Issue is successfully solved with https://gitea.com/gitea/act_runner/issues/301#issuecomment-745582 , closing dialog.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act_runner#301
No description provided.