8000 [bitnami/aws-cli] Bitbucket Pipelines fails silently unless `HOME` env is set to user-writable directory · Issue #81841 · bitnami/containers · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
[bitnami/aws-cli] Bitbucket Pipelines fails silently unless HOME env is set to user-writable directory #81841
Open
@jarp0l

Description

@jarp0l

Name and Version

bitnami/aws-cli:*

What architecture are you using?

None

What steps will reproduce the bug?

  1. Create a Bitbucket Pipeline with the following configuration:
image: bitnami/aws-cli
pipelines:
  default:
    - step:
        name: Test AWS CLI
        script:
          - export AWS_DEFAULT_REGION=us-east-1
          - export AWS_ROLE_ARN=arn:aws:iam::123456789012:role/oidc-role
          - export AWS_WEB_IDENTITY_TOKEN_FILE=$(pwd)/web-identity-token
          - echo $BITBUCKET_STEP_OIDC_TOKEN > $AWS_WEB_IDENTITY_TOKEN_FILE
          - aws sts get-caller-identity
  1. Commit and push the file and let the pipeline run.
  2. Observe that the step appears to fail silently, no output is printed.

What is the expected behavior?

The step should either:

  • Succeed and print the output of script block and the expected output from aws sts get-caller-identity command, or
  • Print an error message indicating why the step failed.

What do you see instead?

  • The step fails silently.
  • No output or error message is printed, making it difficult to diagnose the issue.

Additional information

  • The root cause seems to be that the HOME environment variable is set to / in the image, which is not writable by the non-root user (uid=1001).

  • When I override HOME in the pipeline step (e.g. export HOME=/tmp in the step's script block), the step succeeds, although still no output is shown:

        script:
          - export HOME=/tmp
          - ...
          - echo $BITBUCKET_STEP_OIDC_TOKEN > $AWS_WEB_IDENTITY_TOKEN_FILE
          - aws sts get-caller-identity

Suggested fix

Update the Dockerfile to set the HOME environment variable to a user-writable directory, as done in another Bitnami image:

Without setting HOME env variable After setting HOME env variable on my custom base image
Image Image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0