You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Run docker run ghcr.io/teamhanko/hanko:v0.9.1 version
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
The text was updated successfully, but these errors were encountered:
lfleischmann
changed the title
Version Command: empty output when using container image
version command: empty output when using container image
Nov 27, 2023
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
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
Checklist
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
docker run ghcr.io/teamhanko/hanko:v0.9.1 version
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
The text was updated successfully, but these errors were encountered: