Skip to content

push does not work with docker loginΒ #1

@andymartin

Description

@andymartin

I am trying to build and push docker images from a dotnet core project. The docker-compose build works, and the docker login succeeds, but it fails to push with a resource denied error.

Github Actions Workflow

name: Push Docker Images

on:
  pull_request:
    types: [closed]
  workflow_dispatch:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        submodules: recursive
        token: ${{ secrets.ACCESS_TOKEN }}
    - name: Docker Login
      uses: docker/[email protected]
      with:
        username: ${{ secrets.DOCKERACCT }}
        password: ${{ secrets.DOCKERHUB }}
    - name: docker-compose build
      uses: sudo-bot/action-docker-compose@latest
      with:
        cli-args: -f myapp/docker-compose.yml build --parallel
    - name: docker-compose push
      uses: sudo-bot/action-docker-compose@latest
      with:
        cli-args: -f myapp/docker-compose.yml push

Output

Docker login

Run docker/[email protected] Logging into Docker Hub... Login Succeeded!

docker-compose push

Run sudo-bot/action-docker-compose@latest /usr/bin/docker run --name botsudoactiondockercomposelatest_7978bc --label 9916a7 --workdir /github/workspace --rm -e DOTNET_ROOT -e INPUT_CLI-ARGS -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/trading/trading":"/github/workspace" botsudo/action-docker-compose:latest "-f myapp/docker-compose.yml push" ::debug CLI_ARGS: -f myapp/docker-compose.yml push Pushing service-host (myacct/myapp-service-host:latest)... The push refers to repository [docker.io/myacct/myapp-service-host] denied: requested access to the resource is denied

Metadata

Metadata

Assignees

Labels

questionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions