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

Use touch instead of mount to check whether config.json is mounted #622

Merged
merged 1 commit into from
Oct 23, 2023

Conversation

nscuro
Copy link
Member

@nscuro nscuro commented Oct 23, 2023

Description

Use touch instead of mount to check whether config.json is mounted. In some containerized environments, the mount command is not available, which caused the previous check to fail.

Additionally, modify the config.json file in place when populating it from environment variables, instead of using a temporary file.

The populated config will be logged by the entrypoint script.

Note
Needs to be backported to the 4.9.x branch.

Addressed Issue

Fixes #60
Closes #511
Fixes #513
Closes #514

Additional Details

Example output:

/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-oidc-configuration.sh
30-oidc-configuration.sh: info: effective config: {"API_BASE_URL":null,"API_WITH_CREDENTIALS":null,"OIDC_ISSUER":"foo","OIDC_CLIENT_ID":"bar","OIDC_SCOPE":"openid profile email","OIDC_FLOW":null,"OIDC_LOGIN_BUTTON_TEXT":"baz"}

Checklist

Additionally, modify the `config.json` file in place when populating it from environment variables, instead of using a temporary file.

The populated config will be logged by the entrypoint script.

Fixes DependencyTrack#60

Co-authored-by: Steffen Mueller <[email protected]>
Signed-off-by: nscuro <[email protected]>
@nscuro nscuro added this to the 4.10 milestone Oct 23, 2023
@nscuro nscuro merged commit 8aad056 into DependencyTrack:master Oct 23, 2023
8 checks passed
@nscuro nscuro deleted the issue-60 branch October 23, 2023 20:32
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

Successfully merging this pull request may close these issues.

mount in entrypoint does not work in all environment improve entrypoint
1 participant