rtCamp/action-slack-notify

Error with `DOCKER_CONTENT_TRUST=1`

Closed this issue · 3 comments

I've just added this GitHub Action to our deployment one and if fails with the following error:

Run rtCamp/action-slack-notify@v2
/usr/bin/docker run --name ghcriortcampactionslacknotifyv220_412134 --label 3bec5f --workdir /github/workspace --rm -e DOCKER_CONTENT_TRUST -e SLACK_CHANNEL -e SLACK_COLOR -e SLACK_ICON -e SLACK_TITLE -e SLACK_MESSAGE -e SLACK_USERNAME -e SLACK_WEBHOOK -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_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_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_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/<project-dir>":"/github/workspace" ghcr.io/rtcamp/action-slack-notify:v2.2.0
docker: error establishing connection to trust repository: mkdir /github: permission denied.
See 'docker run --help'.

I suspect it has to do with the content trust check which we enabled for security purposes: https://docs.docker.com/engine/security/trust/.

I am trying to fix it adding DOCKER_CONTENT_TRUST: 0 to the env for the specific step.

It worked, but I leave this issue opened so you'll decide if and how to proceed.

Content trust is disabled by default in the Docker Client. As of now our image is not signed.
We may look into signing it in the future. cc @dhsathiya