Repository navigation
Setting the version number in a custom build #41582
Replies: 2 comments 1 reply
|
Hey @alesnav! The version is ultimately determined by the file For example, to set it to FROM apache/superset:4.1.1
# ... your custom packages/requirements ...
ARG SUPERSET_VERSION=4.1.1
ARG BASE_IMAGE_COMMIT_SHA=unknown
RUN echo "{\"version\": \"${SUPERSET_VERSION}-git.${BASE_IMAGE_COMMIT_SHA}\", \"GIT_SHA\": \"${BASE_IMAGE_COMMIT_SHA}\"}" > \
/app/superset/static/version_info.jsonThen build with: docker build \
--build-arg SUPERSET_VERSION=4.1.1 \
--build-arg BASE_IMAGE_COMMIT_SHA=$(git rev-parse --short HEAD) \
-t my-superset:custom .This will:
The version flows from If Trivy is specifically reading the Python package metadata (from RUN sed -i "s/^Version:.*/Version: ${SUPERSET_VERSION}/" \
/app/superset.egg-info/PKG-INFO 2>/dev/null || trueHope that helps! To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
The "0.0.0-dev" string comes from two places in Superset:
When Trivy scans your custom image, it inspects Python package metadata ( Here is how to patch both the UI display and the package version in your Dockerfile: 1. Patch
|
Uh oh!
There was an error while loading. Please reload this page.
Hello there!
I am building a custom Docker image based on the official published Docker images inside Docker hub, by using the specific commit. The reason is to install all other requirements and packages needed in my environment, so the deployment reload lasts seconds instead of minutes (if I do it using superset-config or entrypoint bash code). I am facing two issues when publishing and using my custom Docker image:
I'd like to patch the version code to {SUPERSET_VERSION}-git.{BASE_IMAGE_COMMIT_SHA}; but I don't know how can I do it.
Could you please help me to get this fixed in my environment?
Thanks!
All reactions