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

backend: version cmd has empty output when using container #1222

Open
2 tasks done
lfleischmann opened this issue Nov 27, 2023 · 2 comments
Open
2 tasks done

backend: version cmd has empty output when using container #1222

lfleischmann opened this issue Nov 27, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@lfleischmann
Copy link
Member

lfleischmann commented Nov 27, 2023

Checklist

  • I could not find a solution in the existing issues or docs.
  • I agree to follow this project's Code of Conduct.

Describe the bug

The output of the version command when using a container/container image is empty.

The reason for this is that the Dockerfile attempts to generate the version information in the form of a text file and embed this file into the built binary, but the generation command expects VCS information to be available (git describe --tags --always --match backend/*) which is not the case because actual VCS data is not present in the image/container that is used when building the image.

If one were to also COPY the .git directory then the version information would be available.

Reproducing the bug

  1. Run docker run ghcr.io/teamhanko/hanko:v0.9.1 version
  2. Observe that only a newline is printed.

Logs

No response

Configuration

No response

Hanko Version

v0.9.1

OS Hanko Backend

None

OS Version Hanko Backend

No response

OS

None

OS Version

No response

Browser Version

No response

Environment

Docker

Additional Context

No response

@lfleischmann lfleischmann added the bug Something isn't working label Nov 27, 2023
@lfleischmann lfleischmann changed the title Version Command: empty output when using container image version command: empty output when using container image Nov 27, 2023
@lfleischmann lfleischmann changed the title version command: empty output when using container image backend: version cmd has empty output when using container image Nov 27, 2023
@lfleischmann lfleischmann changed the title backend: version cmd has empty output when using container image backend: version cmd has empty output when using container Feb 21, 2024
@SNIDGHA
Copy link

SNIDGHA commented Oct 24, 2024

/assign

Copy link

oss-gg bot commented Oct 24, 2024

This issue is not part of oss.gg hackathon. Please pick a different one or start with a side quest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants