Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker-run-action doesn't HONOR login step happened before #20

Open
orihomie opened this issue Jun 23, 2021 · 2 comments
Open

docker-run-action doesn't HONOR login step happened before #20

orihomie opened this issue Jun 23, 2021 · 2 comments

Comments

@orihomie
Copy link

orihomie commented Jun 23, 2021

Hi, if I use docker login step somethere before that action, docker-run-action fails if I omit user & password params

      - name: Login to ACR
        uses: docker/login-action@v1
        with:
          registry: ${{ secrets.registry }}
          username: ${{ secrets.login }}
          password: ${{ secrets.password }}
          
    - name: Run 
        uses: addnab/docker-run-action@v3
        with:
          registry: ${{ secrets.registry }}
          image: ${{ secrets.registry }}/image:${{ secrets.image_tag }}
          options: --rm -i -v ${{ github.workspace }}:/app
          run: echo "Hi"

docker: Error response from daemon: Head https://***/v2/mahimage/manifests/v0.0.1: unauthorized: authentication required, visit https://aka.ms/acr/authorization for more information.

@orihomie
Copy link
Author

orihomie commented Jun 23, 2021

And if I use this projects login options, I'm getting this warning:

WARNING! Your password will be stored unencrypted in /github/home/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

This may cause some problems with caching due to this article

@AlexDCraig
Copy link

This is probably because this Action is run as a container. It won't inherit your login because it spins up a container and within that container it runs the container you specify. It requires you to explicitly pass those args in doing it this way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants