# How to use docker login action

**URL:** <https://forum.gitea.com/t/how-to-use-docker-login-action/7171>\
**Category:** Actions\
**Created:** [April 27, 2023, 11:34am UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171 "2023-04-27T11:34:09Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Zoker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/zoker/32/5242_2.png) [@Zoker](https://forum.gitea.com/u/Zoker)\
**Post date:** [April 27, 2023, 11:34am UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171/1 "2023-04-27T11:34:09Z")

</div>

Hi there,

I’m currently trying to switch from Github Actions to Gitea Actions.  
The one thing I can’t get to work is the docker/login action. I use the one hosted on [gitea.com](http://gitea.com):  
[docker/login-action - login-action - Gitea: Git with a cup of tea](https://gitea.com/docker/login-action)

Here is the step in my actions file:

```auto
      - name: Login to the Container registry
        uses: docker/login-action@v2
        with:
          registry: <my-gitea-url>
          username: <my-username>
          password: ${{ secrets.CI_TOKEN }}

```

Within the project I added a secret called CI\_TOKEN. Now when the action runs, this is the output:

```auto
Logging into <my-gitea-url>...
::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.

```

The error seems to complain, that there is no docker installed on the runner. This is the compose file I use to run the runner:

```auto
version: '3.8'
services:
  gitea_runner:
    image: gitea/act_runner
    container_name: GiteaRunner
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - GITEA_RUNNER_NAME=Gitea Runner
      - GITEA_INSTANCE_URL=<my-gitea-url>
      - GITEA_RUNNER_REGISTRATION_TOKEN=<my-gitea-token>

```

I mount the docker socket inside the container, so in my opinion this should work well.

Can somebody help me and tell me how to debug this?

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [April 27, 2023, 12:14pm UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171/2 "2023-04-27T12:14:43Z")

</div>

If you are using `ubuntu-latest` label, the default image is based on debian with no docker installation. You could use a special image with docker installed.

---

<div class="post-metadata">

**Author:** ![Zoker](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/zoker/32/5242_2.png) [@Zoker](https://forum.gitea.com/u/Zoker)\
**Post date:** [April 28, 2023, 12:27am UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171/3 "2023-04-28T00:27:00Z")

</div>

Is there any recommend image for docker runs? Thanks!

---

<div class="post-metadata">

**Author:** ![ci-runner](https://avatars.discourse-cdn.com/v4/letter/c/f17d59/32.png) [@ci-runner](https://forum.gitea.com/u/ci-runner)\
**Post date:** [April 30, 2023, 9:41pm UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171/4 "2023-04-30T21:41:04Z")

</div>

`jobs:`

` build_and_push:`

` runs-on: ubuntu-latest`

` container:`

` image: catthehacker/ubuntu:act-latest`

` `

` steps:`

` - name: Check out repository code`

` uses: actions/checkout@v3`

---

<div class="post-metadata">

**Author:** ![nathan](https://avatars.discourse-cdn.com/v4/letter/n/c5a1d2/32.png) [@nathan](https://forum.gitea.com/u/nathan)\
**Post date:** [December 16, 2023, 3:53pm UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171/5 "2023-12-16T15:53:09Z")

</div>

Nice it works for me…

---

<div class="post-metadata">

**Author:** ![lunny](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lunny/32/4701_2.png) [@lunny](https://forum.gitea.com/u/lunny)\
**Post date:** [December 16, 2023, 3:53pm UTC](https://forum.gitea.com/t/how-to-use-docker-login-action/7171/6 "2023-12-16T15:53:56Z")

</div>


