teamhanko / hanko

Authentication and user management system optimized for passkeys

Home Page:https://hanko.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

backend: version cmd has empty output when using container

lfleischmann opened this issue · comments

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